Hi all, The array index should not be over 8 for v8hi, or it will fail under -O0 or using -fstack-protector.
This patch aims to fix that, which is mentioned in PR110621. Commit as obvious and backport to GCC13. Thx, Haochen gcc/testsuite/ChangeLog: PR target/110621 * gcc.target/i386/pr105354-2.c: As mentioned. --- gcc/testsuite/gcc.target/i386/pr105354-2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/i386/pr105354-2.c b/gcc/testsuite/gcc.target/i386/pr105354-2.c index b78b62e1e7e..1c592e84860 100644 --- a/gcc/testsuite/gcc.target/i386/pr105354-2.c +++ b/gcc/testsuite/gcc.target/i386/pr105354-2.c @@ -17,7 +17,7 @@ sse2_test (void) b.a[i] = i + 16; res_ab.a[i] = 0; exp_ab.a[i] = -1; - if (i <= 8) + if (i < 8) { c.a[i] = i; d.a[i] = i + 8; -- 2.31.1