modernc.org/ccgo/v3@v3.16.14/lib/testdata/gcc-9.1.0/gcc/testsuite/gcc.c-torture/execute/pr24141.c (about) 1 // reduced testcase, compile with -O2. Also, with --disable-checking 2 // gcc produces wrong code. 3 4 void abort (void); 5 int i; 6 7 void g (void) 8 { 9 i = 1; 10 } 11 12 void f (int a, int b) 13 { 14 int c = 0; 15 if (a == 0) 16 c = 1; 17 if (c) 18 return; 19 if (c == 1) 20 c = 0; 21 if (b == 0) 22 c = 1; 23 if (c) 24 g (); 25 } 26 27 int main (void) 28 { 29 f (1, 0); 30 if (i != 1) 31 abort (); 32 return 0; 33 }