This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/49840] [4.7 Regression] New test failures
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 25 Jul 2011 14:28:22 +0000
- Subject: [Bug middle-end/49840] [4.7 Regression] New test failures
- Auto-submitted: auto-generated
- References: <bug-49840-4@http.gcc.gnu.org/bugzilla/>
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?