* gimplify.c (gimplify_body): Watch for body vanishing.
authorRichard Henderson <rth@redhat.com>
Thu, 24 Jun 2004 16:25:17 +0000 (09:25 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Thu, 24 Jun 2004 16:25:17 +0000 (09:25 -0700)
From-SVN: r83598

gcc/ChangeLog
gcc/gimplify.c

index 9876fc878ae130a6bc59fcbef621d167e4c52e97..da403d9ba008f64ef96c34e147c1c37129cd6a34 100644 (file)
@@ -1,3 +1,7 @@
+2004-06-24  Richard Henderson  <rth@redhat.com>
+
+       * gimplify.c (gimplify_body): Watch for body vanishing.
+
 2004-06-24  Jeff Law  <law@redhat.com>
 
        * tree-ssa-dom.c (record_dominating_conditions): New function.
index 480b8ebbf06127a579902d0c31eadfc6b9fcb973..308f3e9b6a2ff31eabea90ea502e54b731276eb2 100644 (file)
@@ -4142,7 +4142,9 @@ gimplify_body (tree *body_p, tree fndecl)
   /* Unshare again, in case gimplification was sloppy.  */
   unshare_all_trees (body);
 
-  if (TREE_CODE (body) == STATEMENT_LIST)
+  if (!body)
+    body = alloc_stmt_list ();
+  else if (TREE_CODE (body) == STATEMENT_LIST)
     {
       tree t = expr_only (*body_p);
       if (t)