re PR c/9177 (-fdump-translation-unit: C front end deletes function_decl AST nodes...
authorAlexander Sotirov <sluncho@mirizma.org>
Fri, 18 Apr 2003 19:39:29 +0000 (19:39 +0000)
committerGerald Pfeifer <gerald@gcc.gnu.org>
Fri, 18 Apr 2003 19:39:29 +0000 (19:39 +0000)
PR c/9177
* c-decl.c (c_expand_body): Don't garbage collect the function
body if we are going to dump it later.

From-SVN: r65787

gcc/ChangeLog
gcc/c-decl.c

index 571e9cd9e38499b9d58bd3c8260324be941d3a9b..4351cb2c473a0dc1174126653638c977d46f8e9c 100644 (file)
@@ -1,3 +1,9 @@
+2003-04-18  Alexander Sotirov  <sluncho@mirizma.org>
+
+       PR c/9177
+       * c-decl.c (c_expand_body): Don't garbage collect the function
+       body if we are going to dump it later.
+
 2003-04-18  Richard Henderson  <rth@redhat.com>
 
        * config/alpha/alpha.c (SYMBOL_FLAG_NEAR, SYMBOL_FLAG_SAMEGP): Remove.
index c852bd7789b1990922da25c6f054afb8bb72da2e..ee987858421cc852ba19ec36440184d271b99293 100644 (file)
@@ -6244,7 +6244,8 @@ finish_function (nested, can_defer_p)
 
       c_expand_body (fndecl);
 
-      if (uninlinable)
+      /* Keep the function body if it's needed for inlining or dumping.  */
+      if (uninlinable && !dump_enabled_p (TDI_all))
        {
          /* Allow the body of the function to be garbage collected.  */
          DECL_SAVED_TREE (fndecl) = NULL_TREE;