summaryrefslogtreecommitdiff
path: root/gcc/tree-scalar-evolution.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-03 11:09:35 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-03 11:09:35 +0000
commit7624240a9f3c4c7d94cb0f881dbc30c0a880fe6b (patch)
tree966a3e686084e32bc32a1287ab3ad9e51e3c3d7f /gcc/tree-scalar-evolution.c
parente2ce06be597965c78dd7b4a21f47136b9df07a20 (diff)
downloadgcc-7624240a9f3c4c7d94cb0f881dbc30c0a880fe6b.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177267 138bc75d-0d04-0410-961f-82ee72b054a4
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 00fcd3f359f..10aaba4e5b9 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;
}