1 /* { dg-additional-options "-O3" } */
2
3 #include <stdlib.h>
4
5 int a;
6 int c;
7 __attribute__((noinline, noclone)) void foo (int x)
8 {
9 if (x == 0)
10 c++;
11 }
12
13 int
14 main (int argc, char* argv[])
15 {
16 int j, k, b = 0;
17 if (argc == 0)
18 b = 1;
19 for (j = 0; j < 3; j++)
20 for (k = 0; k < 1; k++)
21 {
22 foo (0);
23 if (b)
24 for (k = -1; a;)
25 ;
26 }
27 if (c != 3)
28 abort ();
29 return 0;
30 }