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

     1  /* Testcase for PR fortran/9974.  This was a miscompilation of the g77
     2     front-end caused by the jump bypassing optimizations not handling
     3     instructions inserted on CFG edges.  */
     4  
     5  extern void abort ();
     6  
     7  int bar ()
     8  {
     9    return 1;
    10  }
    11  
    12  void foo (int x)
    13  {
    14    unsigned char error = 0;
    15  
    16    if (! (error = ((x == 0) || bar ())))
    17      bar ();
    18    if (! error)
    19      abort ();
    20  }
    21  
    22  int main()
    23  {
    24    foo (1);
    25    return 0;
    26  }
    27