aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vrp.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2014-06-16 14:21:53 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2014-06-16 14:21:53 +0000
commit9e9f6bf0079f1a8ff965efe7d971a1b636f36fbc (patch)
tree2b9a194e46f795ad0e483a1a60c0cc9bd9306b5b /gcc/tree-vrp.c
parent7964957f618c2d0c8f024cf6135006dfe9d8c9b6 (diff)
downloadgcc-9e9f6bf0079f1a8ff965efe7d971a1b636f36fbc.zip
gcc-9e9f6bf0079f1a8ff965efe7d971a1b636f36fbc.tar.gz
gcc-9e9f6bf0079f1a8ff965efe7d971a1b636f36fbc.tar.bz2
re PR tree-optimization/61482 (ICE in set_value_range, at tree-vrp.c:453 when compiling Firefox ESR 24)
2014-06-16 Richard Biener <rguenther@suse.de> PR tree-optimization/61482 * tree-vrp.c (adjust_range_with_scev): Avoid setting of [-INF(OVF), +INF(OVF)] range. * g++.dg/torture/pr61482.C: New testcase. From-SVN: r211709
Diffstat (limited to 'gcc/tree-vrp.c')
-rw-r--r--gcc/tree-vrp.c29
1 files changed, 12 insertions, 17 deletions
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 428e622..b657546 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -3892,15 +3892,6 @@ adjust_range_with_scev (value_range_t *vr, struct loop *loop,
max = init;
else
min = init;
-
- /* If we would create an invalid range, then just assume we
- know absolutely nothing. This may be over-conservative,
- but it's clearly safe, and should happen only in unreachable
- parts of code, or for invalid programs. */
- if (compare_values (min, max) == 1)
- return;
-
- set_value_range (vr, VR_RANGE, min, max, vr->equiv);
}
else if (vr->type == VR_RANGE)
{
@@ -3933,16 +3924,20 @@ adjust_range_with_scev (value_range_t *vr, struct loop *loop,
|| compare_values (tmax, max) == -1)
max = tmax;
}
+ }
+ else
+ return;
- /* If we just created an invalid range with the minimum
- greater than the maximum, we fail conservatively.
- This should happen only in unreachable
- parts of code, or for invalid programs. */
- if (compare_values (min, max) == 1)
- return;
+ /* If we just created an invalid range with the minimum
+ greater than the maximum, we fail conservatively.
+ This should happen only in unreachable
+ parts of code, or for invalid programs. */
+ if (compare_values (min, max) == 1
+ || (is_negative_overflow_infinity (min)
+ && is_positive_overflow_infinity (max)))
+ return;
- set_value_range (vr, VR_RANGE, min, max, vr->equiv);
- }
+ set_value_range (vr, VR_RANGE, min, max, vr->equiv);
}