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.
--- /dev/null
+/* 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;
+}
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))
{