User account creation filtered due to spam.

Bug 11863 - Regression: Optimizer produces incorrect code for ARM target
Summary: Regression: Optimizer produces incorrect code for ARM target
Status: RESOLVED DUPLICATE of bug 21920
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.3
: P2 normal
Target Milestone: 3.4.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-09 05:47 UTC by Pete Gonzalez
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: i686-pc-cygwin
Target: arm-arm-elf
Build: i686-pc-cygwin
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Test.cpp (704 bytes, text/plain)
2003-08-09 05:49 UTC, Pete Gonzalez
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pete Gonzalez 2003-08-09 05:47:27 UTC
The attached file compiles correctly with GCC versions 3.0.4 and 3.2.3; 
however, incorrect output is produced with GCC 3.3 and the mainline 
snapshot "gcc-3.4-20030730".

The problem goes away when optimizations are disabled.  This problem does not 
occur on other targets, e.g. i686.
Comment 1 Pete Gonzalez 2003-08-09 05:49:21 UTC
Created attachment 4584 [details]
Test.cpp

Compile with this command: "gcc -c -O2 Test.cpp -marm -save-temps"

The output file Test.s should contain three "smull" instructions and six
"smlal" instructions.  However, with GCC 3.3 and later the generated code is
incorrect, e.g. there is only one "smull" instruction and two "smlal"
instructions.
Comment 2 Falk Hueffner 2003-08-09 10:51:06 UTC
Your code contains lots of aliasing violations, which are the cause for your
problems. I suggest you fix them or use -fno-strict-aliasing.
Comment 3 Andrew Pinski 2005-06-05 08:28:00 UTC
Reopening to ...
Comment 4 Andrew Pinski 2005-06-05 08:28:15 UTC
Mark as a dup of bug 21920.

*** This bug has been marked as a duplicate of 21920 ***