This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/7823: Itanium linux gcc 3.2 optimizer bug at -O2 level and above.


>Number:         7823
>Category:       c++
>Synopsis:       Itanium linux gcc 3.2 optimizer bug at -O2 level and above.
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 03 20:16:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Dennis B.
>Release:        g++ (GCC) 3.2
>Organization:
>Environment:
RedHat Linux for Itanium.
kernel 2.4.18-e.0.2smp
glibc 2.2.5
HP Rx4610 quad Itanium machine.
>Description:
The little test case supplied produces an illegal
instruction error when using -O2 or higher on an
Itanium machine. Using -O1 works.

On an x86 RedHat Linux machine the same test
case works with -O2 and above with gcc 3.2.

The Itanium optimizer appears to be producing
incorrect code.
>How-To-Repeat:
The following statement errors on an Itanium Linux machine.
The test case supplied being named Test.cc
#  g++ -O2 Test.cc && a.out
>Fix:
Compile with -O1.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/x-c++src; name="Test.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Test.cc"

I2luY2x1ZGUgPGlvc3RyZWFtPgoKLy8gY29tcGlsaW5nIHdpdGggLU8yIG9uIGFuIEl0YW5pdW0g
bWFjaGluZSAoZWcgIyBnKysgLU8yIFRlc3QuY2MgJiYgYS5vdXQpCi8vIHdpbGwgcHJvZHVjZSBh
biBpbGxlZ2FsIGluc3RydWN0aW9uIGVycm9yIChwbHVzIHRoZSB2YWx1ZXMgb2YgczIgYW5kCi8v
IHQyLnN0cmluZygpIHdpbGwgYmUgZGlmZmVyZW50KS4gVXNpbmcgLU8yIG9uIGFuIHg4NiBtYWNo
aW5lIHdvcmtzLiBMaWtld2lzZQovLyAtTzEgb24gYW4gSXRhbml1bSBtYWNoaW5lIGFsc28gd29y
a3MuCgpjbGFzcyBUZXN0CnsKcHVibGljOgoKICAgIFRlc3QoY29uc3QgY2hhciogcF9zdHIpIDog
c3RyKHBfc3RyKSB7fQogICAgY29uc3QgY2hhciogc3RyOwogICAgbG9uZyBsZW47Cn07CgoKaW50
Cm1haW4oY2hhcioqLCBpbnQpCnsKICAgIHsKICAgICAgICBUZXN0IHQoIkMiKTsKICAgIH0KICAg
IHsKICAgICAgICBjb25zdCBjaGFyIHNbXSA9ICJIZWxsbyB0aGVyZSI7CiAgICB9CiAgICB7CiAg
ICAgICAgY29uc3QgY2hhciBzW10gPSB7IDY3IH07CiAgICAgICAgVGVzdCB0KHMpOwoKICAgICAg
ICAvLyBPbiB0aGUgLU8yIEl0YW5pdW0gYnVpbGQgdGhlIGZvbGxvd2luZyB0d28gdmFsdWVzIGRp
ZmZlci4KICAgICAgICBzdGQ6OmNvdXQgPDwgInM6ICAgICAgICAgICAgICAiIDw8IChsb25nKXMg
PDwgc3RkOjplbmRsOwogICAgICAgIHN0ZDo6Y291dCA8PCAidC5zdHI6ICAgICAgICAgICIgPDwg
KGxvbmcpdC5zdHIgPDwgc3RkOjplbmRsOwoKICAgICAgICAvLyBQcmludCBvdXQgdGhlIGZpcnN0
IHZhbHVlLgogICAgICAgIHN0ZDo6Y291dCA8PCAic1swXTogICAgICAgICAgICIgPDwgc1swXSA8
PCBzdGQ6OmVuZGw7CgogICAgICAgIC8vIFdpdGggZysrIC1PMiB0aGlzIG5leHQgbGluZSBmYWxs
cyBvdmVyIG9uIGFuIEl0YW5pdW0uCiAgICAgICAgc3RkOjpjb3V0IDw8ICJ0LnN0clswXTogICAg
ICAgIiA8PCB0LnN0clswXSA8PCBzdGQ6OmVuZGw7CiAgICB9CgogICAgcmV0dXJuIDA7Cn0K


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]