aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-unswitch.c
diff options
context:
space:
mode:
authorPrathamesh Kulkarni <prathamesh.kulkarni@linaro.org>2019-11-21 20:20:36 +0000
committerPrathamesh Kulkarni <prathamesh3492@gcc.gnu.org>2019-11-21 20:20:36 +0000
commitb30e83f809b2aa65222eb969f8b4523e5e1961f2 (patch)
tree284504136e1dab0723aefe77d17043a04ea05754 /gcc/tree-ssa-loop-unswitch.c
parentd2993abd39aafb807d5d726f253c7ffe8af6fa41 (diff)
downloadgcc-b30e83f809b2aa65222eb969f8b4523e5e1961f2.zip
gcc-b30e83f809b2aa65222eb969f8b4523e5e1961f2.tar.gz
gcc-b30e83f809b2aa65222eb969f8b4523e5e1961f2.tar.bz2
Use safe_dyn_cast instead of dyn_cast in find_loop_guard to fix PR92608.
2019-11-22 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> PR tree-optimization/92608 * tree-ssa-loop-unswitch.c (find_loop_guard): Use safe_dyn_cast instead of dyn_cast. testsuite/ * gcc.dg/torture/pr92608.c: New test. From-SVN: r278598
Diffstat (limited to 'gcc/tree-ssa-loop-unswitch.c')
-rw-r--r--gcc/tree-ssa-loop-unswitch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c
index 49951eb..dbca642 100644
--- a/gcc/tree-ssa-loop-unswitch.c
+++ b/gcc/tree-ssa-loop-unswitch.c
@@ -586,7 +586,7 @@ find_loop_guard (class loop *loop)
next = single_succ (header);
else
{
- cond = dyn_cast <gcond *> (last_stmt (header));
+ cond = safe_dyn_cast <gcond *> (last_stmt (header));
if (! cond)
return NULL;
extract_true_false_edges_from_block (header, &te, &fe);