diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-04-19 11:56:13 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-04-19 11:56:13 +0000 |
commit | 31d035cacd592bbd62c6ac6748c80b4b0f4a4166 (patch) | |
tree | 0919e279fd811424d8884025992dd3f05088d709 | |
parent | e8f1b5ed6409a3218f3c7d2234368d88903cad17 (diff) | |
download | ppe42-gcc-31d035cacd592bbd62c6ac6748c80b4b0f4a4166.tar.gz ppe42-gcc-31d035cacd592bbd62c6ac6748c80b4b0f4a4166.zip |
* calls.c (expand_call): Provide init for old_stack_pointer_delta.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65814 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/calls.c | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fa80d37d6cd..c95cfd82429 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2003-04-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * calls.c (expand_call): Provide init for old_stack_pointer_delta. + 2003-04-19 Nathan Sidwell <nathan@codesourcery.com> * doc/invoke.texi (-fprofile-arcs): Mention -lgcov, locking and diff --git a/gcc/calls.c b/gcc/calls.c index 42e2bf79ac5..ed92ce735c3 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -2212,7 +2212,7 @@ expand_call (exp, target, ignore) /* Some stack pointer alterations we make are performed via allocate_dynamic_stack_space. This modifies the stack_pointer_delta, which we then also need to save/restore along the way. */ - int old_stack_pointer_delta; + int old_stack_pointer_delta = 0; rtx call_fusage; tree p = TREE_OPERAND (exp, 0); @@ -2515,6 +2515,10 @@ expand_call (exp, target, ignore) optimized. */ || (flags & (ECF_RETURNS_TWICE | ECF_LONGJMP | ECF_NORETURN)) || TYPE_VOLATILE (TREE_TYPE (TREE_TYPE (addr))) + /* If the called function is nested in the current one, it might access + some of the caller's arguments, but could clobber them beforehand if + the argument areas are shared. */ + || decl_function_context (fndecl) == current_function_decl /* If this function requires more stack slots than the current function, we cannot change it into a sibling call. */ || args_size.constant > current_function_args_size |