The following testcase was not properly testing anything due to an
uninitialized variable. As a result, the loop was not iterating through
the testing data, but instead on undefined values which could cause an
unexpected abort.

gcc/testsuite/ChangeLog:

        * gcc.target/riscv/rvv/autovec/binop/vec_sat_binary_vx.h:
        initialize variable

Signed-off-by: Edwin Lu <e...@rivosinc.com>
---
 .../gcc.target/riscv/rvv/autovec/binop/vec_sat_binary_vx.h       | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vec_sat_binary_vx.h 
b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vec_sat_binary_vx.h
index d238c6392de..309d63377d5 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vec_sat_binary_vx.h
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vec_sat_binary_vx.h
@@ -9,6 +9,7 @@ main ()
 
   for (i = 0; i < sizeof (DATA) / sizeof (DATA[0]); i++)
     {
+      d = DATA[i];
       RUN_BINARY_VX (&d.x[N], d.b, N);
 
       for (k = 0; k < N; k++)
-- 
2.34.1

Reply via email to