------- Comment #14 from hjl dot tools at gmail dot com 2010-06-16 14:36 ------- The code in question is
offset -= frame_phase; align = offset & -offset; align *= BITS_PER_UNIT; if (align == 0) align = STACK_BOUNDARY; else if (align > MAX_SUPPORTED_STACK_ALIGNMENT) align = MAX_SUPPORTED_STACK_ALIGNMENT; offset is computed from align = get_decl_align_unit (SSAVAR (var)); offset = alloc_stack_frame_space (size, align); If you compute alignment from offset again, you will get a number >= requested alignment. That is when we allocate 8byte aligned at 8byte from stack, we may get offset 8, 16, 24, 32, 40, 48, 56, 64, ... depending on how much we have allocated on stack. As for MAX_SUPPORTED_STACK_ALIGNMENT, I doubt we will hit it since it is a huge number. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44542