From: Alexander Sotirov Date: Fri, 18 Apr 2003 19:39:29 +0000 (+0000) Subject: re PR c/9177 (-fdump-translation-unit: C front end deletes function_decl AST nodes... X-Git-Tag: releases/gcc-3.4.0~7187 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=38a314251e0da0ed3c70f18c66c8877a35e24bdd;p=thirdparty%2Fgcc.git re PR c/9177 (-fdump-translation-unit: C front end deletes function_decl AST nodes and breaks debugging dumps.) 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 571e9cd9e384..4351cb2c473a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2003-04-18 Alexander Sotirov + + 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 * config/alpha/alpha.c (SYMBOL_FLAG_NEAR, SYMBOL_FLAG_SAMEGP): Remove. diff --git a/gcc/c-decl.c b/gcc/c-decl.c index c852bd7789b1..ee987858421c 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -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;