summaryrefslogtreecommitdiff
path: root/gcc/final.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/final.c')
-rw-r--r--gcc/final.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/final.c b/gcc/final.c
index 79cd85e735c..4fe1031458c 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -4441,7 +4441,10 @@ rest_of_clean_state (void)
delete_tree_ssa ();
- if (targetm.binds_local_p (current_function_decl))
+ /* We can reduce stack alignment on call site only when we are sure that
+ the function body just produced will be actually used in the final
+ executable. */
+ if (decl_binds_to_current_def_p (current_function_decl))
{
unsigned int pref = crtl->preferred_stack_boundary;
if (crtl->stack_alignment_needed > crtl->preferred_stack_boundary)