Commit 729edaa1 by Richard Guenther Committed by Richard Biener

re PR middle-end/36817 (internal compiler error: in compare_values_warnv)

2008-08-21  Richard Guenther  <rguenther@suse.de>

	PR middle-end/36817
	* tree-chrec.c (chrec_apply): Always call chrec_fold_plus which
	makes sure to produce a result of the correct type.

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

From-SVN: r139385
parent 812dbce5
2008-08-21 Richard Guenther <rguenther@suse.de>
PR middle-end/36817
* tree-chrec.c (chrec_apply): Always call chrec_fold_plus which
makes sure to produce a result of the correct type.
2008-08-21 Jan Hubicka <jh@suse.cz>
Backport from LTO branch:
......
2008-08-21 Richard Guenther <rguenther@suse.de>
PR middle-end/36817
* gcc.c-torture/compile/pr36817.c: New testcase.
2008-08-21 Richard Guenther <rguenther@suse.de>
* gcc.dg/tree-ssa/ssa-fre-13.c: Remove XFAIL.
* gcc.dg/tree-ssa/ssa-fre-14.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-17.c: Likewise.
......
void xxx()
{
unsigned i;
unsigned *p=0;
for(i=0; i<4; ++i)
*p++=0;
for(i=0; i<4; ++i)
*p++=0;
}
......@@ -579,7 +579,6 @@ chrec_apply (unsigned var,
/* "{a, +, b} (x)" -> "a + b*x". */
x = chrec_convert_rhs (type, x, NULL);
res = chrec_fold_multiply (TREE_TYPE (x), CHREC_RIGHT (chrec), x);
if (!integer_zerop (CHREC_LEFT (chrec)))
res = chrec_fold_plus (type, CHREC_LEFT (chrec), res);
}
......
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