i386: Fix array index overflow in pr105354-2.c

The array index should not be over 8 for v8hi, or it will fail
under -O0 or using -fstack-protector.

gcc/testsuite/ChangeLog:

	PR target/110621
	* gcc.target/i386/pr105354-2.c: As mentioned.
This commit is contained in:
Haochen Jiang 2024-04-26 16:48:29 +08:00
parent 9353f6f475
commit 4a2e55b3ad

View file

@ -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;