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

* [Bug target/36527] gcc 4.2.x generates wrong code for ARM target
  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
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: benny at ammitzboell-consult dot dk @ 2008-06-13 13:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from benny at ammitzboell-consult dot dk  2008-06-13 12:59 -------
Created an attachment (id=15762)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15762&action=view)
C test program


-- 


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


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

* [Bug target/36527] gcc 4.2.x generates wrong code for ARM target
  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 ` benny at ammitzboell-consult dot dk
  2008-06-13 13:00 ` benny at ammitzboell-consult dot dk
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: benny at ammitzboell-consult dot dk @ 2008-06-13 13:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from benny at ammitzboell-consult dot dk  2008-06-13 13:00 -------
Created an attachment (id=15763)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15763&action=view)
C++ test program


-- 


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


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

* [Bug target/36527] gcc 4.2.x generates wrong code for ARM target
  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
                   ` (2 preceding siblings ...)
  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
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: benny at ammitzboell-consult dot dk @ 2008-06-13 13:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from benny at ammitzboell-consult dot dk  2008-06-13 13:01 -------
Created an attachment (id=15765)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15765&action=view)
test.s


-- 


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


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

* [Bug target/36527] gcc 4.2.x generates wrong code for ARM target
  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
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: benny at ammitzboell-consult dot dk @ 2008-06-13 13:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from benny at ammitzboell-consult dot dk  2008-06-13 13:00 -------
Created an attachment (id=15764)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15764&action=view)
test.i


-- 


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


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

* [Bug target/36527] gcc 4.2.x generates wrong code for ARM target
  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
                   ` (4 preceding siblings ...)
  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
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: benny at ammitzboell-consult dot dk @ 2008-06-13 13:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from benny at ammitzboell-consult dot dk  2008-06-13 13:01 -------
Created an attachment (id=15766)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15766&action=view)
testcpp.ii


-- 


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


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

* [Bug target/36527] gcc 4.2.x generates wrong code for ARM target
  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
                   ` (3 preceding siblings ...)
  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
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: benny at ammitzboell-consult dot dk @ 2008-06-13 13:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from benny at ammitzboell-consult dot dk  2008-06-13 13:01 -------
Created an attachment (id=15767)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15767&action=view)
testcpp.s


-- 


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


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

* [Bug target/36527] gcc 4.2.x generates wrong code for ARM target
  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
                   ` (5 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: benny at ammitzboell-consult dot dk @ 2008-06-16  9:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from benny at ammitzboell-consult dot dk  2008-06-16 09:10 -------
test.c also fails with gcc 3.4.6 - testcpp.cpp however works with gcc 3.4.6.


-- 

benny at ammitzboell-consult dot dk changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |major
      Known to fail|4.2.3 4.2.4                 |4.2.3 4.2.4 3.4.6
      Known to work|                            |3.4.6


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


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

* [Bug target/36527] gcc 4.2.x generates wrong code for ARM target
  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
                   ` (6 preceding siblings ...)
  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
  9 siblings, 0 replies; 11+ messages in thread
From: benny at ammitzboell-consult dot dk @ 2008-06-19 14:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from benny at ammitzboell-consult dot dk  2008-06-19 14:07 -------
Works on gcc 4.3.1


-- 

benny at ammitzboell-consult dot dk changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|3.4.6                       |3.4.6 4.3.1


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


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

* [Bug target/36527] gcc 4.2.x generates wrong code for ARM target
  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
                   ` (7 preceding siblings ...)
  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
  9 siblings, 0 replies; 11+ messages in thread
From: ramana at gcc dot gnu dot org @ 2009-04-29 13:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from ramana at gcc dot gnu dot org  2009-04-29 13:48 -------
4.2.x is now closed. Since this appears to work on 4.3.1, could you confirm if
this is still a problem with an eabi toolchain of more recent vintage ?


-- 

ramana at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


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


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

* [Bug target/36527] gcc 4.2.x generates wrong code for ARM target
  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
                   ` (8 preceding siblings ...)
  2009-04-29 13:48 ` ramana at gcc dot gnu dot org
@ 2009-12-11 18:22 ` ramana at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: ramana at gcc dot gnu dot org @ 2009-12-11 18:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from ramana at gcc dot gnu dot org  2009-12-11 18:21 -------
No feedback in over 6 months and appears to work fine in later versions of the
tools.


-- 

ramana at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |WONTFIX
   Target Milestone|---                         |4.3.1


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).