From 19d4e4d614655cf76d87522855103c01d029b2cf Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Mon, 4 Mar 2019 12:23:17 +0000 Subject: re PR tree-optimization/89572 (ICE in dyn_cast(gimple*) / get_loop_exit_condition(loop const*)) 2019-03-04 Richard Biener PR middle-end/89572 * tree-scalar-evolution.c: (get_loop_exit_condition): Use safe_dyn_cast. * gcc.dg/torture/pr89572.c: New testcase. From-SVN: r269363 --- gcc/tree-scalar-evolution.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/tree-scalar-evolution.c') diff --git a/gcc/tree-scalar-evolution.c b/gcc/tree-scalar-evolution.c index 16debb0..3de5590 100644 --- a/gcc/tree-scalar-evolution.c +++ b/gcc/tree-scalar-evolution.c @@ -910,7 +910,7 @@ get_loop_exit_condition (const struct loop *loop) gimple *stmt; stmt = last_stmt (exit_edge->src); - if (gcond *cond_stmt = dyn_cast (stmt)) + if (gcond *cond_stmt = safe_dyn_cast (stmt)) res = cond_stmt; } -- cgit v1.1