------- Comment #9 from jakub at gcc dot gnu dot org 2009-01-27 10:25 ------- So, what should we do for 4.4 then? --- tree-vrp.c.jj 2009-01-02 09:32:55.000000000 +0100 +++ tree-vrp.c 2009-01-27 11:16:57.000000000 +0100 @@ -1620,7 +1620,8 @@ extract_range_from_assert (value_range_t all should be optimized away above us. */ if ((cond_code == LT_EXPR && compare_values (max, min) == 0) - || is_overflow_infinity (max)) + || is_overflow_infinity (max) + || TREE_OVERFLOW (max)) set_value_range_to_varying (vr_p); else { @@ -1655,7 +1656,8 @@ extract_range_from_assert (value_range_t all should be optimized away above us. */ if ((cond_code == GT_EXPR && compare_values (min, max) == 0) - || is_overflow_infinity (min)) + || is_overflow_infinity (min) + || TREE_OVERFLOW (min)) set_value_range_to_varying (vr_p); else {
fixes this for me (and, is_overflow_infinity check could be actually dropped). There is a problem with the testcase also - while the integer constant is so large that it is unsigned warning is emitted always, integer overflow in expression is emitted only for 32-bit HWI gcc, for x86_64 -m32 as well as -m64 only the first warning is emitted. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38934