public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "benny at ammitzboell-consult dot dk" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/36527]  New: gcc 4.2.x generates wrong code for ARM target
Date: Fri, 13 Jun 2008 12:59:00 -0000	[thread overview]
Message-ID: <bug-36527-15808@http.gcc.gnu.org/bugzilla/> (raw)

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


             reply	other threads:[~2008-06-13 12:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-13 12:59 benny at ammitzboell-consult dot dk [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-36527-15808@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).