Commit b2db9220 by Richard Guenther Committed by Richard Biener

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
parent f393e7f5
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
* tree-ssa-ccp.c (fold_stmt_r): Make sure to fold the condition
of a COND_EXPR.
......
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
* gcc.dg/pr28935.c: New testcase.
/* 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))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment