summaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
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))