PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / pr49161.c
blobcc822dae8c3cde3bf0b235da1c8b191a5e271d3f
1 /* PR tree-optimization/49161 */
3 extern void abort (void);
5 int c;
7 __attribute__((noinline, noclone)) void
8 bar (int x)
10 if (x != c++)
11 abort ();
14 __attribute__((noinline, noclone)) void
15 foo (int x)
17 switch (x)
19 case 3: goto l1;
20 case 4: goto l2;
21 case 6: goto l3;
22 default: return;
24 l1:
25 goto l4;
26 l2:
27 goto l4;
28 l3:
29 bar (-1);
30 l4:
31 bar (0);
32 if (x != 4)
33 bar (1);
34 if (x != 3)
35 bar (-1);
36 bar (2);
39 int
40 main ()
42 foo (3);
43 if (c != 3)
44 abort ();
45 return 0;