This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/34903] New: -Os code size regression
- From: "sposelenov at emcraft dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Jan 2008 15:31:09 -0000
- Subject: [Bug c/34903] New: -Os code size regression
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I can't build the embedded application (U-Boot firmware) using the GCC 4.2.2
powerpc-linux cross because resultant code doesn't fit into the reserved space
anymore. GCC 4.0.0 powerpc cross build it OK.
Investigation showed that the code size generated by the GCC 4.2.2 is about 6%
bigger as produced by GCC 4.0.0, as reported by 'size':
gcc 4.2.2:
text data bss dec hex filename
2696 60 1536 4292 10c4 interrupts.o
gcc 4.0.0:
text data bss dec hex filename
2424 88 1536 4048 fd0 interrupts.o
In both cases, same compilation options are used:
ppc-linux-gcc -g -Os -fPIC -ffixed-r14 -meabi -fno-strict-aliasing -D__KERNEL__
-DTEXT_BASE=0xfffc0000 -I/work/psl/tmp/u-boot/include -fno-builtin
-ffreestanding -nostdinc -isystem
/opt/eldk-4.2-01-08/usr/bin/../lib/gcc/powerpc-linux/4.2.2/include -pipe
-DCONFIG_PPC -D__powerpc__ -DCONFIG_4xx -ffixed-r2 -ffixed-r29 -mstring
-msoft-float -Wa,-m440 -mcpu=440 -DCONFIG_440=1 -Wall -Wstrict-prototypes -c -o
interrupts.o interrupts.c
Removing "-ffixed" doesn't change the generated assembler code for 4.2.2
Test case and generated outputs will follow.
--
Summary: -Os code size regression
Product: gcc
Version: 4.2.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sposelenov at emcraft dot com
GCC target triplet: powerpc-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34903