This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/71927] stack alignment prologue not optimized out when no local variables remain
- From: "mirq-gccboogs at rere dot qmqm.pl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 19 Jul 2016 06:56:22 +0000
- Subject: [Bug middle-end/71927] stack alignment prologue not optimized out when no local variables remain
- Auto-submitted: auto-generated
- References: <bug-71927-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71927
Micha³ Miros³aw <mirq-gccboogs at rere dot qmqm.pl> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #38926|0 |1
is obsolete| |
--- Comment #3 from Micha³ Miros³aw <mirq-gccboogs at rere dot qmqm.pl> ---
Created attachment 38927
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38927&action=edit
test case
It seems that just the asm and array length > 2 are needed.
$ gcc -O3 -S -o - c.c
[...]
x:
.LFB0:
.cfi_startproc
ret
.cfi_endproc
[...]
y:
.LFB1:
.cfi_startproc
leaq 8(%rsp), %r10
.cfi_def_cfa 10, 0
andq $-32, %rsp
pushq -8(%r10)
pushq %rbp
.cfi_escape 0x10,0x6,0x2,0x76,0
movq %rsp, %rbp
pushq %r10
.cfi_escape 0xf,0x3,0x76,0x78,0x6
popq %r10
.cfi_def_cfa 10, 0
popq %rbp
leaq -8(%r10), %rsp
.cfi_def_cfa 7, 8
ret
.cfi_endproc