This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/31345] [4.3 Regression] ICE in set_value_range, at tree-vrp.c:269
- From: "ian at airs dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Mar 2007 17:27:17 -0000
- Subject: [Bug tree-optimization/31345] [4.3 Regression] ICE in set_value_range, at tree-vrp.c:269
- References: <bug-31345-12387@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from ian at airs dot com 2007-03-26 18:27 -------
I'm testing this patch.
Index: tree-vrp.c
===================================================================
--- tree-vrp.c (revision 123218)
+++ tree-vrp.c (working copy)
@@ -1982,10 +1982,18 @@ extract_range_from_binary_expr (value_ra
return;
}
+ /* We punt if:
+ 1) [-INF, +INF]
+ 2) [-INF, +-INF(OVF)]
+ 3) [+-INF(OVF), +INF]
+ 4) [+-INF(OVF), +-INF(OVF)]
+ We learn nothing when we have INF and INF(OVF) on both sides.
+ Note that we do accept [-INF, -INF] and [+INF, +INF] without
+ overflow. */
if ((min == TYPE_MIN_VALUE (TREE_TYPE (min))
- || is_negative_overflow_infinity (min))
+ || is_overflow_infinity (min))
&& (max == TYPE_MAX_VALUE (TREE_TYPE (max))
- || is_positive_overflow_infinity (max)))
+ || is_overflow_infinity (max)))
{
set_value_range_to_varying (vr);
return;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31345