1 /* PR tree-optimization/59920 */
2 /* { dg-do compile } */
3 /* { dg-options "-O0" } */
4 
5 void *bar (void **);
6 void *baz (int, void **);
7 
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)
14 
15 int
foo(void)16 foo (void)
17 {
18   D
19   int bar (int i)
20   {
21     switch (i)
22       {
23 #undef A
24 #define A(n) \
25       case n: goto l##n;
26       D
27       }
28     return i;
29   }
30   int w = 0;
31 #undef A
32 #define A(n) int w##n = 0;
33   D
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;			\
41   }
42   D
43 #undef A
44 #define A(n) w += w##n;
45   D
46   return w;
47 }
48