Add new test to verify that the array index, limit, and stride are
[official-gcc.git] / gcc / testsuite / gcc.dg / pr50017.c
blobfeeb4d445ee03ccf9b99ed7632faf5505c01326d
1 /* PR debug/50017 */
2 /* { dg-do compile } */
3 /* { dg-options "-O3 -fcompare-debug" } */
4 /* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
6 struct S { int r, i; };
8 void
9 foo (struct S *x, int y)
11 int i;
12 for (i = 1; i < y; i++)
14 struct S a, b, c;
15 a = x[0];
16 b = x[i];
17 c.r = a.r * b.r - a.i * b.i;
18 c.i = a.r * b.i + a.i * b.r;
19 x[i] = c;