1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
/* { dg-do run } */ /* { dg-options "-O2" } */ extern void abort (void); int foo (int k, int j) { if (k >= 10) { if (j > k) { /* We should fold this to if (0). */ if (j < 10) abort (); } } return j; } int main() { foo (10, 3); return 0; }