http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49234
--- Comment #13 from Ian Lance Taylor <ian at airs dot com> 2013-03-01 19:23:00 UTC --- How hard would it be to test whether the values are all constant or have the same SSA_NAME_VAR as the value we are setting? My only concern about richi's suggestion is that it will miss some simple cases. for (i = 1; i >= 0; i *= 2) { int j = fn1 () ? i : 1; if (j >= 0) fn (); } Here i overflows and so does j, but I think your patch will teach VRP that j does not overflow, so we will get no warning for j >= 0. Or something like that.