diff options
author | Richard Biener <rguenther@suse.de> | 2019-03-14 09:14:30 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2019-03-14 09:14:30 +0000 |
commit | 2552fb9d979782d5265e32f5362850e973afe380 (patch) | |
tree | 65daae78e407a4069a989ac52e4064f417f2b4d7 /gcc/tree-scalar-evolution.c | |
parent | 29363afdc38a9f1367bd50984540134a8cf76c72 (diff) | |
download | gcc-2552fb9d979782d5265e32f5362850e973afe380.zip gcc-2552fb9d979782d5265e32f5362850e973afe380.tar.gz gcc-2552fb9d979782d5265e32f5362850e973afe380.tar.bz2 |
re PR tree-optimization/89572 (ICE in dyn_cast<gcond*, gimple>(gimple*) / get_loop_exit_condition(loop const*))
2019-03-14 Richard Biener <rguenther@suse.de>
PR middle-end/89572
* tree-scalar-evolution.c (get_loop_exit_condition): Use
safe_dyn_cast.
* tree-ssa-loop-ivcanon.c (canonicalize_loop_induction_variables):
Use gimple_location_safe.
* gcc.dg/torture/pr89572.c: New testcase.
From-SVN: r269675
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 c955352..759bc61 100644 --- a/gcc/tree-scalar-evolution.c +++ b/gcc/tree-scalar-evolution.c @@ -875,7 +875,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; } |