From be1ba3d170d2119394c4700e320240264513d64e Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 24 Jun 2004 09:25:17 -0700 Subject: [PATCH] * gimplify.c (gimplify_body): Watch for body vanishing. From-SVN: r83598 --- gcc/ChangeLog | 4 ++++ gcc/gimplify.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9876fc878ae..da403d9ba00 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2004-06-24 Richard Henderson + + * gimplify.c (gimplify_body): Watch for body vanishing. + 2004-06-24 Jeff Law * tree-ssa-dom.c (record_dominating_conditions): New function. diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 480b8ebbf06..308f3e9b6a2 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -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)