------- Comment #14 from jakub at gcc dot gnu dot org 2010-09-16 13:54 ------- The reason why cfgexpand does increase the alignment is that it believes that the base slot will be at least PREFERRED_STACK_BOUNDARY bytes aligned, which is true on all targets but i?86/x86-64, which apparently sometimes chooses even smaller alignment for the stack base. So, we can either use there MAX (..., STACK_BOUNDARY); for STACK_ALIGNMENT_SUPPORTED instead, which might penalize some code though, or use INCOMING_STACK_BOUNDARY there (after making sure we compute it before) and bump needed alignment to whatever we pick there up. During expansion expanders of course make use of the DECL_ALIGN info cfgexpand provides, after all that's why we do that.
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45678