From dc721f3696d4cbf22182ae2ba3107a14fe25550e Mon Sep 17 00:00:00 2001 From: hubicka Date: Tue, 13 Jan 2004 23:59:19 +0000 Subject: 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 --- gcc/cgraphunit.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gcc/cgraphunit.c') 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)) -- cgit v1.2.1