This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/37664] [4.4 Regression] ice in remove_range_assertions, at tree-vrp.c:5116



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]