summaryrefslogtreecommitdiff
path: root/gcc/calls.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2003-12-08 10:33:46 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2003-12-08 10:33:46 +0000
commit648deebac8a5c2db6290d055dd6bd88b6d54a812 (patch)
treedae49fea73f861d99e12259603b7484ef98c6cea /gcc/calls.c
parentbdd64cbef403677f46362009e2b592176d04d22d (diff)
downloadgcc-648deebac8a5c2db6290d055dd6bd88b6d54a812.tar.gz
* calls.c (expand_call): Don't try using tail or recursive calls
after the function body has been expanded. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74415 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/calls.c')
-rw-r--r--gcc/calls.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/calls.c b/gcc/calls.c
index 79d9b9c4452..50466c2f8f6 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -2485,11 +2485,15 @@ expand_call (tree exp, rtx target, int ignore)
finished with regular parsing. Which means that some of the
machinery we use to generate tail-calls is no longer in place.
This is most often true of sjlj-exceptions, which we couldn't
- tail-call to anyway. */
+ tail-call to anyway.
+ If current_nesting_level () == 0, we're being called after
+ the function body has been expanded. This can happen when
+ setting up trampolines in expand_function_end. */
if (currently_expanding_call++ != 0
|| !flag_optimize_sibling_calls
|| !rtx_equal_function_value_matters
+ || current_nesting_level () == 0
|| any_pending_cleanups ()
|| args_size.var)
try_tail_call = try_tail_recursion = 0;