This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/37664] [4.4 Regression] ice in remove_range_assertions, at tree-vrp.c:5116
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Oct 2008 11:59:40 -0000
- Subject: [Bug tree-optimization/37664] [4.4 Regression] ice in remove_range_assertions, at tree-vrp.c:5116
- References: <bug-37664-12544@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37664