summaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2004-01-13 23:59:19 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2004-01-13 23:59:19 +0000
commitdc721f3696d4cbf22182ae2ba3107a14fe25550e (patch)
tree27cbfcbaa8a6b2863468e56d367667ff8cb34a0a /gcc/cgraphunit.c
parentfff4a7bf7ef36f74755e97460072ee483ded489e (diff)
downloadgcc-dc721f3696d4cbf22182ae2ba3107a14fe25550e.tar.gz
Partial fix PR c++/12850
* cgraphunit.c (cgraph_finalize_function): Always ggc_collect when at zero nest level. * decl2.c (mark_used): Do not proactively instantiate templates when compiling in unit-at-a-time or not optimizing. * optimize.c (maybe_clone_body): Do not increase function depth. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75823 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r--gcc/cgraphunit.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index cf7069b1b08..e26a2c1730e 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -219,7 +219,10 @@ cgraph_finalize_function (tree decl, bool nested)
/* If not unit at a time, go ahead and emit everything we've found
to be reachable at this time. */
if (!nested)
- cgraph_assemble_pending_functions ();
+ {
+ if (!cgraph_assemble_pending_functions ())
+ ggc_collect ();
+ }
/* If we've not yet emitted decl, tell the debug info about it. */
if (!TREE_ASM_WRITTEN (decl))