This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/14227] New: [regression] Poor code for varargs functions.
- From: "pbrook at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Feb 2004 15:49:20 -0000
- Subject: [Bug optimization/14227] New: [regression] Poor code for varargs functions.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Current gcc (3.5) generates poor quality code for varargs functions compared to earlier
versions. I have tested the following versions:
3.5 (2004-02-19): poor
tree-ssa (2003-02-17, merged 2004-01-26): poor
3.5 (2004-01-26): good
3.4, 3.3.3: good
The regression is present on both i686-linux and arm-none-elf
Eg. the compiling the attached code with -O2 gives:
(gcc-3.4)
bar:
pushl %ebp
movl %esp, %ebp
movl 12(%ebp), %eax
popl %ebp
ret
(gcc-3.5)
bar:
pushl %ebp
movl %esp, %ebp
leal 12(%ebp), %eax
subl $4, %esp
movl %eax, -4(%ebp)
movl -4(%ebp), %edx
movl -4(%ebp), %eax
addl $4, %eax
movl %eax, -4(%ebp)
movl (%edx), %eax
leave
ret
--
Summary: [regression] Poor code for varargs functions.
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Keywords: pessimizes-code
Severity: normal
Priority: P2
Component: optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pbrook at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14227