PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / pr56962.c
blob7c6da48b30799e6fa0d0fada1300fb0fa233bec7
1 /* PR tree-optimization/56962 */
3 extern void abort (void);
4 long long v[144];
6 __attribute__((noinline, noclone)) void
7 bar (long long *x)
9 if (x != &v[29])
10 abort ();
13 __attribute__((noinline, noclone)) void
14 foo (long long *x, long y, long z)
16 long long a, b, c;
17 a = x[z * 4 + y * 3];
18 b = x[z * 5 + y * 3];
19 c = x[z * 5 + y * 4];
20 x[y * 4] = a;
21 bar (&x[z * 5 + y]);
22 x[z * 5 + y * 5] = b + c;
25 int
26 main ()
28 foo (v, 24, 1);
29 return 0;