[Bug c/45207] New: The -Os flag generates wrong code for ARM966e-s
fredrik dot hederstierna at securitas-direct dot com
gcc-bugzilla@gcc.gnu.org
Fri Aug 6 07:15:00 GMT 2010
We have problems with GCC-4.5.0 and GCC-4.5.1 for ARM when using the "-Os"
optimizer flag. The code crashes due to what seems to be undefined instruction
exception.
If we instead use "-O1" or "-O2" it works fine. Also GCC-4.3.x and GCC-4.4.x
works well.
I also tried to add all excluded -O2 flags when compiling with -Os but this
gave still wrong code.
Our CFLAGS:
-g3 -ggdb3 -gdwarf-2 -mthumb -c -Wall -W -Wextra -Wno-unused-parameter
-mcpu=arm966e-s -Os -mhard-float -mfpu=fpa -ffunction-sections -fdata-sections
I attach build-script for our arm-elf-toolchain built on an intel machine.
Also arm-elf-gdb 7.1 complaints about the elf file when trying to debug:
warning: (Internal error: pc 0x4a42c in read in psymtab, but not in symtab.)
Thanks and Best Regards,
Fredrik Hederstierna
--
Summary: The -Os flag generates wrong code for ARM966e-s
Product: gcc
Version: 4.5.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fredrik dot hederstierna at securitas-direct dot com
GCC target triplet: arm-elf-gcc
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45207
More information about the Gcc-bugs
mailing list