https://gcc.gnu.org/g:25e37abccfcdd4604e5d917d98d537aa33a53a82
commit 25e37abccfcdd4604e5d917d98d537aa33a53a82 Author: Edwin Lu <e...@rivosinc.com> Date: Fri Jul 12 11:31:16 2024 -0700 RISC-V: Fix testcase for vector .SAT_SUB in zip benchmark 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> (cherry picked from commit 4306f76192bc7ab71c5997a7e2c95320505029ab) Diff: --- gcc/testsuite/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++)