tree-ssa-loop-manip.c (ip_normal_pos): Check if last stmt is NULL.
authorRichard Guenther <rguenther@suse.de>
Tue, 1 May 2007 14:54:30 +0000 (14:54 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 1 May 2007 14:54:30 +0000 (14:54 +0000)
2007-05-01  Richard Guenther  <rguenther@suse.de>

* tree-ssa-loop-manip.c (ip_normal_pos): Check if last stmt
  is NULL.

From-SVN: r124329

gcc/ChangeLog
gcc/tree-ssa-loop-manip.c

index 015c4a14e5343b8ab51438052be3ee779aa14728..617a0dabdb737a37bcc7efd81c1419d4c827741b 100644 (file)
@@ -1,3 +1,8 @@
+2007-05-01  Richard Guenther  <rguenther@suse.de>
+
+       * tree-ssa-loop-manip.c (ip_normal_pos): Check if last stmt
+       is NULL.
+
 2007-05-01  Joseph Myers  <joseph@codesourcery.com>
 
        * config/rs6000/libgcc-ppc-glibc.ver (__gcc_qgt): Fix typo.
index 7611a6f2a5da66cba7667d856a192293acf5c9d7..3416df32d3c93aa2a884d4bf4a7d50bc10df1bdc 100644 (file)
@@ -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);