diff options
Diffstat (limited to 'gcc/ira.c')
-rw-r--r-- | gcc/ira.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/ira.c b/gcc/ira.c index e16d062e35a..97edf8c4816 100644 --- a/gcc/ira.c +++ b/gcc/ira.c @@ -2259,9 +2259,12 @@ ira_setup_eliminable_regset (void) frame_pointer_needed = (! flag_omit_frame_pointer || (cfun->calls_alloca && EXIT_IGNORE_STACK) - /* We need the frame pointer to catch stack overflow exceptions - if the stack pointer is moving. */ - || (flag_stack_check && STACK_CHECK_MOVING_SP) + /* We need the frame pointer to catch stack overflow exceptions if + the stack pointer is moving (as for the alloca case just above). */ + || (STACK_CHECK_MOVING_SP + && flag_stack_check + && flag_exceptions + && cfun->can_throw_non_call_exceptions) || crtl->accesses_prior_frames || (SUPPORTS_STACK_ALIGNMENT && crtl->stack_realign_needed) /* We need a frame pointer for all Cilk Plus functions that use |