(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
debug/
dwarf2/
pr36690-2.c
       1  /* PR debug/36690 */
       2  /* Verify that breakpoint can be put on goto f1, it is hit and
       3     varz at that spot is defined and contains 5.  Nowhere else
       4     in the function should be varz in the scope.  */
       5  /* { dg-do compile } */
       6  /* { dg-options "-O0 -gdwarf -dA" } */
       7  
       8  int cnt;
       9  
      10  void
      11  bar (int i)
      12  {
      13    cnt += i;
      14  }
      15  
      16  void
      17  foo (int i)
      18  {
      19    if (!i)
      20      bar (0);
      21    else
      22      {
      23        static int varz = 5;
      24        goto f1;
      25      }
      26    bar (1);
      27  f1:
      28    bar (2);
      29  }
      30  
      31  int
      32  main (void)
      33  {
      34    foo (0);
      35    foo (1);
      36    return 0;
      37  }
      38  
      39  /* { dg-final { scan-assembler "pr36690-2.c:24" } } */