(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
torture/
pr100566.c
       1  /* { dg-do run } */
       2  
       3  volatile int s, c;
       4  
       5  __attribute__((noipa)) void
       6  foo (void)
       7  {
       8    if (c++ > 1)
       9      __builtin_abort ();
      10  }
      11  
      12  __attribute__((noipa)) int
      13  bar (void)
      14  {
      15    int i = 0, j = s;
      16    if (j == 0)
      17      goto lab;
      18    for (i = 0; i < j; i++)
      19      {
      20      lab:
      21        foo ();
      22        if (!j)
      23          goto lab;
      24      }
      25    return 0;
      26  }
      27  
      28  int
      29  main ()
      30  {
      31    s = 1;
      32    bar ();
      33    if (c != 1)
      34      __builtin_abort ();
      35    return 0;
      36  }