diff options
author | Richard Guenther <rguenther@suse.de> | 2006-09-05 08:36:39 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2006-09-05 08:36:39 +0000 |
commit | b2db922002d6d95cc0fc2f7965c9a5ba81c6cf5a (patch) | |
tree | f69d8afa798891dbc042ce2310e6980818a89056 /gcc/tree-vrp.c | |
parent | f393e7f57d2643b83b30603568bd7260a6451731 (diff) | |
download | gcc-b2db922002d6d95cc0fc2f7965c9a5ba81c6cf5a.zip gcc-b2db922002d6d95cc0fc2f7965c9a5ba81c6cf5a.tar.gz gcc-b2db922002d6d95cc0fc2f7965c9a5ba81c6cf5a.tar.bz2 |
re PR tree-optimization/28905 (ICE in compare_name_with_value, at tree-vrp.c:3557)
2006-09-05 Richard Guenther <rguenther@suse.de>
PR tree-optimization/28905
* tree-vrp.c (fix_equivalence_set): Manually implement
!value_ranges_intersect_p to also handle symbolic ranges.
* gcc.c-torture/compile/pr28905.c: New testcase.
From-SVN: r116696
Diffstat (limited to 'gcc/tree-vrp.c')
-rw-r--r-- | gcc/tree-vrp.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index 5f53211..a212744 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -774,14 +774,18 @@ fix_equivalence_set (value_range_t *vr_p) value_range_t *equiv_vr = vr_value[i]; if (equiv_vr->type == VR_VARYING - || equiv_vr->type == VR_UNDEFINED - || symbolic_range_p (equiv_vr)) + || equiv_vr->type == VR_UNDEFINED) continue; - if (equiv_vr->type == VR_RANGE - && vr_p->type == VR_RANGE - && !value_ranges_intersect_p (vr_p, equiv_vr)) - bitmap_set_bit (to_remove, i); + if (vr_p->type == VR_RANGE + && equiv_vr->type == VR_RANGE) + { + /* Two ranges have an empty intersection if their end points + are outside of the other range. */ + if (compare_values (equiv_vr->min, vr_p->max) == 1 + || compare_values (equiv_vr->max, vr_p->min) == -1) + bitmap_set_bit (to_remove, i); + } else if ((equiv_vr->type == VR_RANGE && vr_p->type == VR_ANTI_RANGE) || (equiv_vr->type == VR_ANTI_RANGE && vr_p->type == VR_RANGE)) { |