public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/36527]  New: gcc 4.2.x generates wrong code for ARM target
@ 2008-06-13 12:59 benny at ammitzboell-consult dot dk
  2008-06-13 13:00 ` [Bug target/36527] " benny at ammitzboell-consult dot dk
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: benny at ammitzboell-consult dot dk @ 2008-06-13 12:59 UTC (permalink / raw)
  To: gcc-bugs

We have encountered what seems to be a gcc bug in the attempt to upgrade our
toolchain (using buildroot, embedded ARM no-MMU CPU) from 3.4.6 to 4.2.x. The
bug has been seen on both 4.2.3 and 4.2.4. We have not yet been able to build a
toolchain based on gcc 4.3.1. Most of our +5 MB system runs fine, but some
strange problems we had boiled down to the attached test programs which
essentially deals with passing some int parms and a struct through two function
calls. The test code fails when executed on the ARM target. It works on x86
using gcc 4.2.3 and also on a MIPS platform using gcc 4.2.1.

The test code only fails with -O2.

Compiled using:

bla@bla-desktop:~/src/kuss/tmp$
/home/bla/src/kuss/bs/toolchain/linux24/usr/bin/arm-elf-gcc -save-temps -c
-Wall -Werror -O2 -g -Wa,-W -o .o/arm4/test.o test.c
bla@bla-desktop:~/src/kuss/tmp$
/home/bla/src/kuss/bs/toolchain/linux24/usr/bin/arm-elf-g++ -save-temps -c
-Wall -Werror -O2 -g -Wa,-W -o .o/arm4/testcpp.o testcpp.cpp

Output from the C test run on target:

:/> /bin/test
### C test: Values before test: 1 2 3 4
### FAILS: 0x00000001 0x00000002 0x00000004 0x00000004
### OK

Output from the C++ test run on target:

:/> /bin/testcpp
### C++ test: Values before test: 1 2 3 4
### FAILS: 0x00000001 0x00000002 0x00000004 0x00000004
### OK

bla@bla-desktop:~/src/kuss/tmp$ ../bs/toolchain/linux24/usr/bin/arm-elf-gcc -v
Using built-in specs.
Target: arm-linux-uclibc
Configured with:
/home/bla/src/kuss/opensrc/gpl/toolchains/arm-gcc4/toolchain_build_arm/gcc-4.2.4/configure
--prefix=/usr --build=i386-pc-linux-gnu --host=i386-pc-linux-gnu
--target=arm-linux-uclibc --enable-languages=c,c++
--with-sysroot=/home/bla/src/kuss/bs/toolchain/linux24
--with-build-time-tools=/home/bla/src/kuss/bs/toolchain/linux24/usr/arm-linux-uclibc/bin
--disable-__cxa_atexit --enable-target-optspace --with-gnu-ld --disable-libgomp
--disable-libmudflap --disable-shared
--with-gmp=/home/bla/src/kuss/opensrc/gpl/toolchains/arm-gcc4/toolchain_build_arm/gmp
--with-mpfr=/home/bla/src/kuss/opensrc/gpl/toolchains/arm-gcc4/toolchain_build_arm/mpfr
--disable-nls --enable-threads --disable-multilib --with-float=soft
--with-arch=armv4 --with-tune=arm7tdmi
Thread model: posix
gcc version 4.2.4


-- 
           Summary: gcc 4.2.x generates wrong code for ARM target
           Product: gcc
           Version: 4.2.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: benny at ammitzboell-consult dot dk
 GCC build triplet: i386-pc-linux-gnu
  GCC host triplet: i386-pc-linux-gnu
GCC target triplet: arm-linux-uclibc


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36527


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-12-11 18:22 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-13 12:59 [Bug target/36527] New: gcc 4.2.x generates wrong code for ARM target benny at ammitzboell-consult dot dk
2008-06-13 13:00 ` [Bug target/36527] " benny at ammitzboell-consult dot dk
2008-06-13 13:00 ` benny at ammitzboell-consult dot dk
2008-06-13 13:01 ` benny at ammitzboell-consult dot dk
2008-06-13 13:01 ` benny at ammitzboell-consult dot dk
2008-06-13 13:02 ` benny at ammitzboell-consult dot dk
2008-06-13 13:02 ` benny at ammitzboell-consult dot dk
2008-06-16  9:10 ` benny at ammitzboell-consult dot dk
2008-06-19 14:08 ` benny at ammitzboell-consult dot dk
2009-04-29 13:48 ` ramana at gcc dot gnu dot org
2009-12-11 18:22 ` ramana at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).