Small ChangeLog tweak.
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr68963.c
blobc83b543fa0356e7714a14788f02e84445ab801c5
1 /* { dg-do run } */
3 static const float a[3] = { 1, 2, 3 };
4 int b = 3;
6 __attribute__((noinline, noclone)) void
7 bar (int x)
9 if (x != b++)
10 __builtin_abort ();
13 void
14 foo (float *x, int y)
16 int i;
17 for (i = 0; i < 2 * y; ++i)
19 if (i < y)
20 x[i] = a[i];
21 else
23 bar (i);
24 x[i] = a[i - y];
29 int
30 main ()
32 float x[10];
33 unsigned int i;
34 for (i = 0; i < 10; ++i)
35 x[i] = 1337;
36 foo (x, 3);
37 for (i = 0; i < 10; ++i)
38 if (x[i] != (i < 6 ? (i % 3) + 1 : 1337))
39 __builtin_abort ();
40 return 0;