public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* optimization/4875: Optimiser produces incorrect code for i386 platforms
@ 2001-11-02 9:16 ahelm
0 siblings, 0 replies; 5+ messages in thread
From: ahelm @ 2001-11-02 9:16 UTC (permalink / raw)
To: gcc-gnats
>Number: 4875
>Category: optimization
>Synopsis: Optimiser produces incorrect code for i386 platforms
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Wed Nov 14 04:26:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Anton Helm
>Release: gcc v3.0.2
>Organization:
>Environment:
gcc v3.0.2
Exactly the same behaviour using DJGPP
and Linux version.
>Description:
When running the attached program compiled with
any optimisation level greater than 0 the results
are incorrect. Hexadecimal output of the variable s
suggests that an incorrect sign extension is performed.
I.e. the 32 high bits of s are set to 1 when assigning a
positive long or long long literal to a long long variable.
The behaviour has been verified with gcc 3.0.2 on
PC/WinNT with DJGPP and on Linux.
Both show the incorrect results.
I don't have any detailed information on the two
Linux systems used to verify the problem because I didn't
run the tests there myself. I only know that one was a
SUSE and the other a Redhat distribution.
gcc v3.0.2 on Solaris v2.6 doesn't show this error.
>How-To-Repeat:
gcc -Wall o.c
gcc -Wall -O2 o.c
Run both executables and compare output.
>Fix:
Do not use any optimisation :-(
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/x-unknown-content-type-PFE32; name="O.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="O.c"
I2luY2x1ZGUgPHN0ZGlvLmg+DQoNCmNvbnN0IGludCBhWzEwXSA9IHstMSwgMSwgMCwgMSwgLTEs
IC0xLCAxLCAwLCAtMSwgLTF9Ow0KDQppbnQgbWFpbih2b2lkKQ0Kew0KICBsb25nIGxvbmcgczsN
CiAgaW50IGk7DQoNCiAgZm9yKGk9MDtpPDEwO2krKykNCiAgew0KICAgIHMgPSBhW2ldOw0KICAg
IGlmKHM8MCkNCiAgICB7DQogICAgICBzID0gLTIxNDc0ODM2NDhMTDsNCiAgICB9DQogICAgZWxz
ZQ0KICAgIHsNCiAgICAgIHMgPSAyMTQ3NDgzNjQ3TEw7DQogICAgfQ0KICAgIGZwcmludGYoc3Rk
ZXJyLCAiJWxsZCAlMDE2bGx4XG4iLCBzLCBzKTsNCiAgfQ0KDQogIHJldHVybiAwOw0KfQ0K
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: optimization/4875: Optimiser produces incorrect code for i386 platforms
@ 2001-11-21 4:16 rth
0 siblings, 0 replies; 5+ messages in thread
From: rth @ 2001-11-21 4:16 UTC (permalink / raw)
To: rth; +Cc: gcc-prs
The following reply was made to PR optimization/4875; it has been noted by GNATS.
From: rth@gcc.gnu.org
To: ahelm@gmx.net, gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org,
gcc-prs@gcc.gnu.org, rth@gcc.gnu.org
Cc:
Subject: Re: optimization/4875: Optimiser produces incorrect code for i386 platforms
Date: 27 Nov 2001 09:07:32 -0000
Synopsis: Optimiser produces incorrect code for i386 platforms
State-Changed-From-To: analyzed->closed
State-Changed-By: rth
State-Changed-When: Tue Nov 27 01:07:31 2001
State-Changed-Why:
http://gcc.gnu.org/ml/gcc-patches/2001-11/msg01813.html
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=4875&database=gcc
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: optimization/4875: Optimiser produces incorrect code for i386 platforms
@ 2001-11-21 4:16 rth
0 siblings, 0 replies; 5+ messages in thread
From: rth @ 2001-11-21 4:16 UTC (permalink / raw)
To: ahelm, gcc-bugs, gcc-gnats, gcc-prs, rth
Synopsis: Optimiser produces incorrect code for i386 platforms
State-Changed-From-To: analyzed->closed
State-Changed-By: rth
State-Changed-When: Tue Nov 27 01:07:31 2001
State-Changed-Why:
http://gcc.gnu.org/ml/gcc-patches/2001-11/msg01813.html
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=4875&database=gcc
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: optimization/4875: Optimiser produces incorrect code for i386 platforms
@ 2001-11-21 2:31 rth
0 siblings, 0 replies; 5+ messages in thread
From: rth @ 2001-11-21 2:31 UTC (permalink / raw)
To: rth; +Cc: gcc-prs
The following reply was made to PR optimization/4875; it has been noted by GNATS.
From: rth@gcc.gnu.org
To: ahelm@gmx.net, gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org,
gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, rth@gcc.gnu.org
Cc:
Subject: Re: optimization/4875: Optimiser produces incorrect code for i386 platforms
Date: 27 Nov 2001 01:57:25 -0000
Synopsis: Optimiser produces incorrect code for i386 platforms
Responsible-Changed-From-To: unassigned->rth
Responsible-Changed-By: rth
Responsible-Changed-When: Mon Nov 26 17:57:24 2001
Responsible-Changed-Why:
Mine.
State-Changed-From-To: open->analyzed
State-Changed-By: rth
State-Changed-When: Mon Nov 26 17:57:24 2001
State-Changed-Why:
Test case committed as gcc.c-torture/execute/20011126-1.c;
fix forthcoming.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=4875&database=gcc
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: optimization/4875: Optimiser produces incorrect code for i386 platforms
@ 2001-11-21 2:06 rth
0 siblings, 0 replies; 5+ messages in thread
From: rth @ 2001-11-21 2:06 UTC (permalink / raw)
To: ahelm, gcc-bugs, gcc-gnats, gcc-prs, nobody, rth
Synopsis: Optimiser produces incorrect code for i386 platforms
Responsible-Changed-From-To: unassigned->rth
Responsible-Changed-By: rth
Responsible-Changed-When: Mon Nov 26 17:57:24 2001
Responsible-Changed-Why:
Mine.
State-Changed-From-To: open->analyzed
State-Changed-By: rth
State-Changed-When: Mon Nov 26 17:57:24 2001
State-Changed-Why:
Test case committed as gcc.c-torture/execute/20011126-1.c;
fix forthcoming.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=4875&database=gcc
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2001-11-27 9:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-02 9:16 optimization/4875: Optimiser produces incorrect code for i386 platforms ahelm
2001-11-21 2:06 rth
2001-11-21 2:31 rth
2001-11-21 4:16 rth
2001-11-21 4:16 rth
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).