diff options
author | Richard Henderson <rth@redhat.com> | 2003-09-08 09:54:13 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2003-09-08 09:54:13 -0700 |
commit | c4bb110a19d441dbaef58fe4215bda6537e5c8a4 (patch) | |
tree | 2a429372d91b62de9e98aba3487e9646fdd7a88c /gcc/cp/optimize.c | |
parent | f23fb7f5252c3cb2f551d66c0887e2232f10736d (diff) | |
download | gcc-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.c | 7 |
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; } |