modernc.org/ccgo/v3@v3.16.14/lib/testdata/gcc-9.1.0/gcc/testsuite/gcc.c-torture/compile/20070905-1.c (about)

     1  /* PR tree-optimization/32772 */
     2  
     3  struct S
     4  {
     5    unsigned long bits[1];
     6  };
     7  
     8  void f1 (int, unsigned long *);
     9  int f2 (void);
    10  int f3 (int, unsigned long *);
    11  int f4 (int, unsigned long *);
    12  
    13  static inline __attribute__ ((always_inline))
    14  void baz (int x, volatile struct S *y)
    15  {
    16    f1 (x, y->bits);
    17  }
    18  
    19  static int
    20  bar (int x, struct S *y)
    21  {
    22    int n;
    23    if (__builtin_constant_p (x) ? f3 (x, y->bits) : f4 (x, y->bits))
    24      baz (x, y);
    25    for (n = f2 (); n < 8; n = f2 ())
    26      f3 (n, y->bits);
    27  }
    28  
    29  void
    30  foo (int x, int y)
    31  {
    32    struct S m;
    33    while ((y = bar (x, &m)) >= 0);
    34  }