(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
graphite/
pr106055.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-Os -floop-parallelize-all -fno-tree-dce" } */
       3  
       4  __attribute__ ((returns_twice)) int
       5  bar (void);
       6  
       7  void
       8  quux (void);
       9  
      10  void
      11  empty (void)
      12  {
      13  }
      14  
      15  unsigned int
      16  choose (unsigned int x, unsigned int y)
      17  {
      18    return y ? x : 0;
      19  }
      20  
      21  int
      22  foo (int *p, unsigned int x, int y)
      23  {
      24    unsigned int acc = 0;
      25  
      26    empty ();
      27  
      28    while (x)
      29      {
      30        bar ();
      31        ++x;
      32      }
      33  
      34    while (y)
      35      acc += y;
      36  
      37    *p = choose (acc, 1);
      38    quux ();
      39  
      40    return x;
      41  }