Commit 42289977 by Richard Guenther Committed by Richard Biener

re PR tree-optimization/32453 (ICE in build2_stat, at tree.c:3074 (extract_range_from_assert))

2007-06-21  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/32453
	* tree-vrp.c (extract_range_from_assert): Build POINTER_PLUS_EXPR
	for pointer anti-range.

	* gcc.c-torture/compile/pr32453.c: New testcase.

From-SVN: r125922
parent 461a73b5
2007-06-21 Richard Guenther <rguenther@suse.de>
PR tree-optimization/32453
* tree-vrp.c (extract_range_from_assert): Build POINTER_PLUS_EXPR
for pointer anti-range.
2007-06-21 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/i386.c (processor_target_table): Increase maximum
......
2007-06-21 Richard Guenther <rguenther@suse.de>
PR tree-optimization/32453
* gcc.c-torture/compile/pr32453.c: New testcase.
2007-06-21 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/31866
void ucs2reverse_internal_loop_single (long *irreversible, int foo)
{
unsigned char bytebuf[2];
const unsigned char *inptr = bytebuf;
if (irreversible == (void *)0)
;
else
inptr += 2;
if (inptr != bytebuf)
((inptr - bytebuf > foo) ? (void) (0) : __assert_fail ());
}
......@@ -1473,10 +1473,13 @@ extract_range_from_assert (value_range_t *vr_p, tree expr)
}
min = positive_overflow_infinity (TREE_TYPE (var_vr->min));
}
else
else if (!POINTER_TYPE_P (TREE_TYPE (var_vr->min)))
min = fold_build2 (PLUS_EXPR, TREE_TYPE (var_vr->min),
anti_max,
build_int_cst (TREE_TYPE (var_vr->min), 1));
else
min = fold_build2 (POINTER_PLUS_EXPR, TREE_TYPE (var_vr->min),
anti_max, size_int (1));
max = real_max;
set_value_range (vr_p, VR_RANGE, min, max, vr_p->equiv);
}
......
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