https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104196
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Here is one which shows the issue just in case fold gets in the way: int a = 6; int main() { for (;;) { int c = 111; if (a < 0) c = -__INT_MAX__ - a; int b = a; if (a >= 0 || c > 0) b = 0; if (b != 4096 - __INT_MAX__) { if (a < 6) __builtin_abort (); return 0; } } } The main point is the undefined behavior of -__INT_MAX__ - a when a is not less than 0 which is not true here as a is always 6. Also for some reason using the C++ front-end also works around the issue ... (but I don't see how though).