2014-04-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr59920-3.c
blob2159504e363c9af57ee6d0e68668c7fa76bcb892
1 /* PR tree-optimization/59920 */
2 /* { dg-do compile } */
3 /* { dg-options "-O0" } */
5 void *bar (void **);
6 void *baz (int, void **);
8 #define A(n) __label__ l##n;
9 #define B(n) A(n##0) A(n##1) A(n##2) A(n##3) A(n##4) \
10 A(n##5) A(n##6) A(n##7) A(n##8) A(n##9)
11 #define C(n) B(n##0) B(n##1) B(n##2) B(n##3) B(n##4) \
12 B(n##5) B(n##6) B(n##7) B(n##8) B(n##9)
13 #define D C(1)
15 int
16 foo (void)
19 int bar (int i)
21 switch (i)
23 #undef A
24 #define A(n) \
25 case n: goto l##n;
28 return i;
30 int w = 0;
31 #undef A
32 #define A(n) int w##n = 0;
34 #undef A
35 #define A(n) \
36 { l##n:; \
37 w##n += bar (10000 + n) - 10000; \
38 w##n += bar (10001 + n) - 10000; \
39 bar (n + 1); \
40 return w##n; \
43 #undef A
44 #define A(n) w += w##n;
46 return w;