diff options
author | Richard Biener <rguenther@suse.de> | 2019-03-04 12:23:17 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2019-03-04 12:23:17 +0000 |
commit | 19d4e4d614655cf76d87522855103c01d029b2cf (patch) | |
tree | e2a2b32d29b3576883ae772253770465b7767c51 /gcc/tree-scalar-evolution.c | |
parent | 0e31827300f1ce12857070c5f27a10ebcca4933e (diff) | |
download | gcc-19d4e4d614655cf76d87522855103c01d029b2cf.zip gcc-19d4e4d614655cf76d87522855103c01d029b2cf.tar.gz gcc-19d4e4d614655cf76d87522855103c01d029b2cf.tar.bz2 |
re PR tree-optimization/89572 (ICE in dyn_cast<gcond*, gimple>(gimple*) / get_loop_exit_condition(loop const*))
2019-03-04 Richard Biener <rguenther@suse.de>
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
Diffstat (limited to 'gcc/tree-scalar-evolution.c')
-rw-r--r-- | gcc/tree-scalar-evolution.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 <gcond *> (stmt)) + if (gcond *cond_stmt = safe_dyn_cast <gcond *> (stmt)) res = cond_stmt; } |