aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-scalar-evolution.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-08-03 11:09:35 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-08-03 11:09:35 +0000
commiteb723fa314a09f6cf8708f8243a436ff9475558c (patch)
tree966a3e686084e32bc32a1287ab3ad9e51e3c3d7f /gcc/tree-scalar-evolution.c
parent0187b60e160e72673f1116a215ca257e11ba3903 (diff)
downloadgcc-eb723fa314a09f6cf8708f8243a436ff9475558c.zip
gcc-eb723fa314a09f6cf8708f8243a436ff9475558c.tar.gz
gcc-eb723fa314a09f6cf8708f8243a436ff9475558c.tar.bz2
re PR middle-end/49938 (ICE in interpret_loop_phi, at tree-scalar-evolution.c:1645)
2011-08-03 Richard Guenther <rguenther@suse.de> PR tree-optimization/49938 * tree-scalar-evolution.c (interpret_loop_phi): Gracefully deal with a POLYNOMIAL_CHREC. * g++.dg/torture/pr49938.C: New testcase. From-SVN: r177267
Diffstat (limited to 'gcc/tree-scalar-evolution.c')
-rw-r--r--gcc/tree-scalar-evolution.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-scalar-evolution.c b/gcc/tree-scalar-evolution.c
index 00fcd3f..10aaba4 100644
--- a/gcc/tree-scalar-evolution.c
+++ b/gcc/tree-scalar-evolution.c
@@ -1642,8 +1642,8 @@ interpret_loop_phi (struct loop *loop, gimple loop_phi_node)
else if (TREE_CODE (res) == POLYNOMIAL_CHREC)
new_init = CHREC_LEFT (res);
STRIP_USELESS_TYPE_CONVERSION (new_init);
- gcc_assert (TREE_CODE (new_init) != POLYNOMIAL_CHREC);
- if (!operand_equal_p (init_cond, new_init, 0))
+ if (TREE_CODE (new_init) == POLYNOMIAL_CHREC
+ || !operand_equal_p (init_cond, new_init, 0))
return chrec_dont_know;
}