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

     1  /* PR rtl-optimization/34490 */
     2  
     3  extern void abort (void);
     4  
     5  static int x;
     6  
     7  int
     8  __attribute__((noinline))
     9  bar (void)
    10  {
    11    return x;
    12  }
    13  
    14  int
    15  foo (void)
    16  {
    17    long int b = bar ();
    18    if ((unsigned long) b < -4095L)
    19      return b;
    20    if (-b != 38)
    21      b = -2;
    22    return b + 1;
    23  }
    24  
    25  int
    26  main (void)
    27  {
    28    x = 26;
    29    if (foo () != 26)
    30      abort ();
    31    x = -39;
    32    if (foo () != -1)
    33      abort ();
    34    x = -38;
    35    if (foo () != -37)
    36      abort ();
    37    return 0;
    38  }