http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47353
Summary: superfluous alignment after dynamic stack allocation Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: middle-end AssignedTo: unassig...@gcc.gnu.org ReportedBy: ebotca...@gcc.gnu.org Since 2003-10-07 Geoffrey Keating <geo...@apple.com> * function.c (pad_to_arg_alignment): Take STACK_POINTER_OFFSET into account when aligning arguments. * calls.c (STACK_POINTER_OFFSET): Move default from here ... * defaults.h (STACK_POINTER_OFFSET): ... to here. was installed, STACK_POINTER_OFFSET has always been defined; as a consequence, the code in allocate_dynamic_stack_space has unconditionally aligned the stack pointer after the allocation. See http://gcc.gnu.org/ml/gcc-patches/2011-01/msg00842.html for an approach to eliminating the superfluous alignment on most platforms.