aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1998-02-07 23:26:08 +0000
committerJeff Law <law@gcc.gnu.org>1998-02-07 16:26:08 -0700
commit060fbabfb9c4b3a671c58c5b8838d5580706d75a (patch)
tree9045b085ea62f69237dc6da0c752d1f414b6c77c /gcc
parentb515ab3d515e702f50c738cd2a264e1f3ab3ba49 (diff)
downloadgcc-060fbabfb9c4b3a671c58c5b8838d5580706d75a.zip
gcc-060fbabfb9c4b3a671c58c5b8838d5580706d75a.tar.gz
gcc-060fbabfb9c4b3a671c58c5b8838d5580706d75a.tar.bz2
expr.c (clear_pending_stack_adjust): Handle case where a function calls alloca...
* expr.c (clear_pending_stack_adjust): Handle case where a function calls alloca, but the user has specified -fomit-fframe-pointer. From-SVN: r17770
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/expr.c8
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f0198fd..e3e61f7e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,8 @@
Sun Feb 8 00:09:59 1998 Jeffrey A Law (law@cygnus.com)
+ * expr.c (clear_pending_stack_adjust): Handle case where a function
+ calls alloca, but the user has specified -fomit-fframe-pointer.
+
* function.c (assign_parms): Fix typo in last change.
Sat Feb 7 23:54:29 1998 Robert Lipe <robertl@dgii.com>
diff --git a/gcc/expr.c b/gcc/expr.c
index 4d927d7..74c6be5 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -9576,14 +9576,18 @@ init_pending_stack_adjust ()
}
/* When exiting from function, if safe, clear out any pending stack adjust
- so the adjustment won't get done. */
+ so the adjustment won't get done.
+
+ Note, if the current function calls alloca, then it must have a
+ frame pointer regardless of the value of flag_omit_frame_pointer. */
void
clear_pending_stack_adjust ()
{
#ifdef EXIT_IGNORE_STACK
if (optimize > 0
- && ! flag_omit_frame_pointer && EXIT_IGNORE_STACK
+ && (! flag_omit_frame_pointer || current_function_calls_alloca)
+ && EXIT_IGNORE_STACK
&& ! (DECL_INLINE (current_function_decl) && ! flag_no_inline)
&& ! flag_inline_functions)
pending_stack_adjust = 0;