[...@gnu-6 pr39137]$ cat pr39137-3.i void foo (unsigned long long *); void bar (void) { unsigned long long l __attribute__ ((aligned(32))); foo (&l); } [...@gnu-6 pr39137]$ /export/build/gnu/gcc-work/build-x86_64-linux/gcc/xgcc -B/export/build/gnu/gcc-avx/build-x86_64-linux/gcc/ -m32 -Os pr39137-3.i -S [...@gnu-6 pr39137]$ cat pr39137-3.s .file "pr39137-3.i" .text .globl bar .type bar, @function bar: leal 4(%esp), %ecx andl $-32, %esp pushl -4(%ecx) pushl %ebp movl %esp, %ebp pushl %ecx subl $64, %esp leal -56(%ebp), %eax pushl %eax call foo movl -4(%ebp), %ecx addl $16, %esp leave leal -4(%ecx), %esp ret .size bar, .-bar [...@gnu-6 pr39137]$ /export/build/gnu/gcc-work/build-x86_64-linux/gcc/xgcc -B/export/build/gnu/gcc-avx/build-x86_64-linux/gcc/ -m32 -O pr39137-3.i -S [...@gnu-6 pr39137]$ cat pr39137-3.s .file "pr39137-3.i" .text .globl bar .type bar, @function bar: pushl %ebp movl %esp, %ebp andl $-32, %esp subl $48, %esp leal 16(%esp), %eax movl %eax, (%esp) call foo leave ret .size bar, .-bar [...@gnu-6 pr39137]$
-Os generates bigger binary. -- Summary: -Os increase code size when stack is aligned Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: hjl dot tools at gmail dot com GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39148