1/* PR tree-optimization/49161 */
2
3extern void abort (void);
4
5int c;
6
7__attribute__((noinline, noclone)) void
8bar (int x)
9{
10  if (x != c++)
11    abort ();
12}
13
14__attribute__((noinline, noclone)) void
15foo (int x)
16{
17  switch (x)
18    {
19    case 3: goto l1;
20    case 4: goto l2;
21    case 6: goto l3;
22    default: return;
23    }
24l1:
25  goto l4;
26l2:
27  goto l4;
28l3:
29  bar (-1);
30l4:
31  bar (0);
32  if (x != 4)
33    bar (1);
34  if (x != 3)
35    bar (-1);
36  bar (2);
37}
38
39int
40main ()
41{
42  foo (3);
43  if (c != 3)
44    abort ();
45  return 0;
46}
47