summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-manip.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-01 14:54:30 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-01 14:54:30 +0000
commitd92f9312dfdf41e819df592007133059841779cb (patch)
tree8da306125db7926922d10088a08f996a4b617cdc /gcc/tree-ssa-loop-manip.c
parentcbc331646c1858c23617a75806f5958aef7cc0e7 (diff)
downloadgcc-d92f9312dfdf41e819df592007133059841779cb.tar.gz
2007-05-01 Richard Guenther <rguenther@suse.de>
* tree-ssa-loop-manip.c (ip_normal_pos): Check if last stmt is NULL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124329 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-loop-manip.c')
-rw-r--r--gcc/tree-ssa-loop-manip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-ssa-loop-manip.c b/gcc/tree-ssa-loop-manip.c
index 7611a6f2a5d..3416df32d3c 100644
--- a/gcc/tree-ssa-loop-manip.c
+++ b/gcc/tree-ssa-loop-manip.c
@@ -505,7 +505,8 @@ ip_normal_pos (struct loop *loop)
bb = single_pred (loop->latch);
last = last_stmt (bb);
- if (TREE_CODE (last) != COND_EXPR)
+ if (!last
+ || TREE_CODE (last) != COND_EXPR)
return NULL;
exit = EDGE_SUCC (bb, 0);