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
This commit is contained in:
parent
f393e7f57d
commit
b2db922002
4 changed files with 32 additions and 6 deletions
|
@ -1,3 +1,9 @@
|
|||
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.
|
||||
|
||||
2006-09-05 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/28935
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2006-09-05 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/28905
|
||||
* gcc.c-torture/compile/pr28905.c: New testcase.
|
||||
|
||||
2006-09-05 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/28935
|
||||
|
|
11
gcc/testsuite/gcc.c-torture/compile/pr28905.c
Normal file
11
gcc/testsuite/gcc.c-torture/compile/pr28905.c
Normal file
|
@ -0,0 +1,11 @@
|
|||
/* We used to ICE here because after VRP we ended up with
|
||||
non-compatible ranges in a value-range equivalences set. */
|
||||
void code_comment (int size)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < size; i++)
|
||||
if (i)
|
||||
if (i < 0)
|
||||
if (i < 0)
|
||||
return;
|
||||
}
|
|
@ -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))
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue