(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
pr59920-3.c
       1  /* PR tree-optimization/59920 */
       2  /* { dg-do compile } */
       3  /* { dg-options "-O0" } */
       4  /* { dg-require-effective-target nonlocal_goto } */
       5  
       6  void *bar (void **);
       7  void *baz (int, void **);
       8  
       9  #define A(n) __label__ l##n;
      10  #define B(n) A(n##0) A(n##1) A(n##2) A(n##3) A(n##4) \
      11  	     A(n##5) A(n##6) A(n##7) A(n##8) A(n##9)
      12  #define C(n) B(n##0) B(n##1) B(n##2) B(n##3) B(n##4) \
      13  	     B(n##5) B(n##6) B(n##7) B(n##8) B(n##9)
      14  #define D C(1)
      15  
      16  int
      17  foo (void)
      18  {
      19    D
      20    int bar (int i)
      21    {
      22      switch (i)
      23        {
      24  #undef A
      25  #define A(n) \
      26        case n: goto l##n;
      27        D
      28        }
      29      return i;
      30    }
      31    int w = 0;
      32  #undef A
      33  #define A(n) int w##n = 0;
      34    D
      35  #undef A
      36  #define A(n) \
      37    { l##n:; 				\
      38      w##n += bar (10000 + n) - 10000;	\
      39      w##n += bar (10001 + n) - 10000;	\
      40      bar (n + 1);			\
      41      return w##n;			\
      42    }
      43    D
      44  #undef A
      45  #define A(n) w += w##n;
      46    D
      47    return w;
      48  }