http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49419
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-06-15 12:19:00 UTC --- So, i_47 which is the i value on entry of the second loop is determined to be [0, +INF(OVF)] and something goes wrong afterwards. The bug will be there, but I should note that VRP should easily prove that i never overflows. Simpler testcases for that: void bar (void); void foo (int x, int y) { if (x < y) { if (x == __INT_MAX__) bar (); } } void baz (int x, int y, int z) { if (x < y || x < z) { if (x == __INT_MAX__) bar (); } } Here IMNSHO vrp should optimize the call to bar away, as when x is smaller than some variable of the same type, it can't be the maximum of that type, because even if the other number is __INT_MAX__, x must be smaller than that.