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

     1  
     2  static int next_buffer = 0;
     3  void bar (void);
     4  
     5  static int t = 1, u = 0;
     6  
     7  long
     8  foo (unsigned int offset)
     9  {
    10    unsigned i, buffer;
    11    int x;
    12    char *data;
    13  
    14    i = u;
    15    if (i)
    16      return i * 0xce2f;
    17  
    18    buffer = next_buffer;
    19    data = buffer * 0xce2f;
    20    for (i = 0; i < 2; i++)
    21      bar ();
    22    buffer = next_buffer;
    23    return buffer * 0xce2f + offset;
    24  
    25  }
    26  
    27  void
    28  bar (void)
    29  {
    30  }
    31  
    32  int
    33  main ()
    34  {
    35    if (foo (3) != 3)
    36      abort ();
    37    next_buffer = 1;
    38    if (foo (2) != 0xce2f + 2)
    39      abort ();
    40    exit (0);
    41  }