[Bug middle-end/49840] [4.7 Regression] New test failures
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jul 25 14:28:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49840
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-07-25 14:27:50 UTC ---
Does
Index: gcc/tree-vrp.c
===================================================================
--- gcc/tree-vrp.c (revision 176745)
+++ gcc/tree-vrp.c (working copy)
@@ -7432,11 +7465,15 @@ range_fits_type_p (value_range_t *vr, un
return false;
tem = double_int_ext (tree_to_double_int (vr->min), precision, unsigned_p);
- if (!double_int_equal_p (tree_to_double_int (vr->min), tem))
+ if ((TYPE_UNSIGNED (TREE_TYPE (vr->min)) != unsigned_p
+ && (TREE_INT_CST_HIGH (vr->min) < 0) != (tem.high < 0))
+ || !double_int_equal_p (tree_to_double_int (vr->min), tem))
return false;
tem = double_int_ext (tree_to_double_int (vr->max), precision, unsigned_p);
- if (!double_int_equal_p (tree_to_double_int (vr->max), tem))
+ if ((TYPE_UNSIGNED (TREE_TYPE (vr->max)) != unsigned_p
+ && (TREE_INT_CST_HIGH (vr->max) < 0) != (tem.high < 0))
+ || !double_int_equal_p (tree_to_double_int (vr->max), tem))
return false;
return true;
fix it?
More information about the Gcc-bugs
mailing list