------- Comment #9 from rguenther at suse dot de 2008-10-15 12:15 ------- Subject: Re: [4.4 Regression] ice in remove_range_assertions, at tree-vrp.c:5116
On Wed, 15 Oct 2008, jakub at gcc dot gnu dot org wrote: > ------- Comment #8 from jakub at gcc dot gnu dot org 2008-10-15 11:59 ------- > Anyway, the ICE is caused by PR37327. As > 139890 rguenth if (TREE_CODE (val) == INTEGER_CST > 139890 rguenth && TREE_OVERFLOW (val)) > 139890 rguenth val = build_int_cst_wide (TREE_TYPE (val), > 139890 rguenth TREE_INT_CST_LOW (val), > TREE_INT_CST_HIGH (val)); > removes overflow flag from loc->val, any_uint > UINT_MAX comparison folds to > false, which triggers the: > tree cond = fold (ASSERT_EXPR_COND (rhs)); > gcc_assert (cond != boolean_false_node); > assertion in remove_range_assertions. To fix this, we could either: > 1) in register_new_assert_for if TREE_OVERFLOW was set on original val try to > fold_binary the condition and if it yields false, don't add the assertion > candidate at all > 2) in process_assert_insertions_for don't add anything if the condition folds > to false > 3) remove the folding and assert in remove_range_assertions 4) make fold fold any_overflowed_uint > UINT_MAX to boolean_false_node which IMHO makes more sense. We should try getting rid of spurious overflow flags in the IL, one way is to make them have no effect. Richard. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37664