aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/optimize.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2003-09-08 09:54:13 -0700
committerRichard Henderson <rth@gcc.gnu.org>2003-09-08 09:54:13 -0700
commitc4bb110a19d441dbaef58fe4215bda6537e5c8a4 (patch)
tree2a429372d91b62de9e98aba3487e9646fdd7a88c /gcc/cp/optimize.c
parentf23fb7f5252c3cb2f551d66c0887e2232f10736d (diff)
downloadgcc-c4bb110a19d441dbaef58fe4215bda6537e5c8a4.zip
gcc-c4bb110a19d441dbaef58fe4215bda6537e5c8a4.tar.gz
gcc-c4bb110a19d441dbaef58fe4215bda6537e5c8a4.tar.bz2
* optimize.c (maybe_clone_body): Inc/dec function_depth.
From-SVN: r71210
Diffstat (limited to 'gcc/cp/optimize.c')
-rw-r--r--gcc/cp/optimize.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/optimize.c b/gcc/cp/optimize.c
index bcb74e4..3204311 100644
--- a/gcc/cp/optimize.c
+++ b/gcc/cp/optimize.c
@@ -130,6 +130,11 @@ maybe_clone_body (tree fn)
/* Emit the DWARF1 abstract instance. */
(*debug_hooks->deferred_inline_function) (fn);
+ /* Our caller does not expect collection to happen, which it might if
+ we decide to compile the function to rtl now. Arrange for a new
+ gc context to be created if so. */
+ function_depth++;
+
/* We know that any clones immediately follow FN in the TYPE_METHODS
list. */
for (clone = TREE_CHAIN (fn);
@@ -253,6 +258,8 @@ maybe_clone_body (tree fn)
pop_from_top_level ();
}
+ function_depth--;
+
/* We don't need to process the original function any further. */
return 1;
}