re PR tree-optimization/68455 (ICE: tree check: expected integer_cst, have plus_expr in decompose, at tree.h:5123)

PR tree-optimization/68455
	* tree-vrp.c (extract_range_from_binary_expr_1): Don't call
	extract_range_from_multiplicative_op_1 on symbolic ranges.

	* gcc.dg/tree-ssa/pr68455.c: New test.

From-SVN: r230768
This commit is contained in:
Marek Polacek 2015-11-23 17:18:36 +00:00 committed by Marek Polacek
parent cde9d59626
commit 78275c8bdb
4 changed files with 31 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2015-11-23 Marek Polacek <polacek@redhat.com>
PR tree-optimization/68455
* tree-vrp.c (extract_range_from_binary_expr_1): Don't call
extract_range_from_multiplicative_op_1 on symbolic ranges.
2015-11-23 Richard Henderson <rth@redhat.com>
* optabs.def (uaddv4_optab, usubv4_optab): New.

View File

@ -1,3 +1,8 @@
2015-11-23 Marek Polacek <polacek@redhat.com>
PR tree-optimization/68455
* gcc.dg/tree-ssa/pr68455.c: New test.
2015-11-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/68465

View File

@ -0,0 +1,19 @@
/* PR tree-optimization/68455 */
/* { dg-do compile } */
/* { dg-options "-O2" } */
int r;
int n;
void
fn1 (void)
{
int i;
for (i = 0; i < 1; ++i)
{
unsigned short int u;
if (u < n)
r = 1 / n;
}
}

View File

@ -3015,7 +3015,7 @@ extract_range_from_binary_expr_1 (value_range *vr,
return;
}
}
else
else if (!symbolic_range_p (&vr0) && !symbolic_range_p (&vr1))
{
extract_range_from_multiplicative_op_1 (vr, code, &vr0, &vr1);
return;