diff options
author | Richard Sandiford <rsandifo@redhat.com> | 2003-12-08 10:33:46 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2003-12-08 10:33:46 +0000 |
commit | a6a5a42dd56db6aa559755b53552309de5efef24 (patch) | |
tree | dae49fea73f861d99e12259603b7484ef98c6cea | |
parent | c45b6ae00734eed1f2b94db390e326a31169b422 (diff) | |
download | gcc-a6a5a42dd56db6aa559755b53552309de5efef24.zip gcc-a6a5a42dd56db6aa559755b53552309de5efef24.tar.gz gcc-a6a5a42dd56db6aa559755b53552309de5efef24.tar.bz2 |
calls.c (expand_call): Don't try using tail or recursive calls after the function body has been expanded.
* calls.c (expand_call): Don't try using tail or recursive calls
after the function body has been expanded.
From-SVN: r74415
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/calls.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 917f98e..48f0406 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-12-08 Richard Sandiford <rsandifo@redhat.com> + + * calls.c (expand_call): Don't try using tail or recursive calls + after the function body has been expanded. + 2003-12-08 Jan Hubicka <jh@suse.cz> * i386.md (cmpstr expander): Obey TARGET_INLINE_ALL_STRINGOPS diff --git a/gcc/calls.c b/gcc/calls.c index 79d9b9c..50466c2 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; |