public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: optimization/7232: Incorrect code generate for volatiles and -O2
@ 2002-07-09  1:47 sirl
  0 siblings, 0 replies; 3+ messages in thread
From: sirl @ 2002-07-09  1:47 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, karm, nobody, steby, svlu

Synopsis: Incorrect code generate for volatiles and -O2

State-Changed-From-To: open->closed
State-Changed-By: sirl
State-Changed-When: Tue Jul  9 01:47:10 2002
State-Changed-Why:
    Not a bug.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7232


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

* Re: optimization/7232: Incorrect code generate for volatiles and -O2
@ 2002-07-08  6:06 Franz Sirl
  0 siblings, 0 replies; 3+ messages in thread
From: Franz Sirl @ 2002-07-08  6:06 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR optimization/7232; it has been noted by GNATS.

From: Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
To: svlu@enea.se
Cc: gcc-gnats@gcc.gnu.org,karm@enea.se,steby@enea.se
Subject: Re: optimization/7232: Incorrect code generate for volatiles
  and -O2
Date: Mon, 08 Jul 2002 15:04:55 +0200

 At 14:33 08.07.2002, svlu@enea.se wrote:
 
 > >Number:         7232
 > >Category:       optimization
 > >Synopsis:       Incorrect code generate for volatiles and -O2
 > >Confidential:   no
 > >Severity:       critical
 > >Priority:       medium
 > >Responsible:    unassigned
 > >State:          open
 > >Class:          sw-bug
 > >Submitter-Id:   net
 > >Arrival-Date:   Mon Jul 08 05:36:00 PDT 2002
 > >Closed-Date:
 > >Last-Modified:
 > >Originator:     Sven Lundblad / OSE Systems
 > >Release:        gcc 3.1
 > >Organization:
 > >Environment:
 >Solaris hosted cross compiler for powerpc and mips
 > >Description:
 >When the code below is compiled with gcc 3.1 and -O2, for at
 >least powerpc and mips, the second load instruction is
 >incorrect during the next pointer update (the same value is
 >reloaded instead of follow the pointer). It seams to be
 >related to the use of the volatile keyword.
 >
 >If compiled with just -O it works fine.
 >
 >This is a regression from gcc 2.95 which worked fine.
 > >How-To-Repeat:
 >Compile the gcc_bug1.c file with -S -O2 and examine the
 >output.
 
 This is what the current gcc-3_1-branch does to your code at -O2, is the 
 bug still there?
 
          .file   "test.c"
          .section        ".text"
          .align 2
          .type   force_gcc_ppc_bug,@function
 force_gcc_ppc_bug:
          lis 11,ll@ha
          li 0,4660
          la 11,ll@l(11)
          lwz 10,8(11)
          lwz 9,8(11)
          stw 0,0(10)
          mr 3,10
          lwz 0,4(9)
          li 9,0
          stw 0,8(11)
          li 0,18
          stw 9,4(10)
          stb 0,42(10)
          blr
 .Lfe1:
          .size   force_gcc_ppc_bug,.Lfe1-force_gcc_ppc_bug
          .comm   ll,12,4
          .ident  "GCC: (GNU) 3.1.1 20020704 (prerelease)"
 
 Franz.
 


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

* optimization/7232: Incorrect code generate for volatiles and -O2
@ 2002-07-08  5:36 svlu
  0 siblings, 0 replies; 3+ messages in thread
From: svlu @ 2002-07-08  5:36 UTC (permalink / raw)
  To: gcc-gnats; +Cc: karm, steby


>Number:         7232
>Category:       optimization
>Synopsis:       Incorrect code generate for volatiles and -O2
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 08 05:36:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Sven Lundblad / OSE Systems
>Release:        gcc 3.1
>Organization:
>Environment:
Solaris hosted cross compiler for powerpc and mips
>Description:
When the code below is compiled with gcc 3.1 and -O2, for at
least powerpc and mips, the second load instruction is
incorrect during the next pointer update (the same value is
reloaded instead of follow the pointer). It seams to be
related to the use of the volatile keyword.

If compiled with just -O it works fine.

This is a regression from gcc 2.95 which worked fine.
>How-To-Repeat:
Compile the gcc_bug1.c file with -S -O2 and examine the
output.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="gcc_bug1.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="gcc_bug1.c"

dHlwZWRlZiBzdHJ1Y3QgYV9saW5rX3N0cnVjdAp7CiAgdW5zaWduZWQgaW50ICBhOwogIHVuc2ln
bmVkIGludCAgYjsKICB1bnNpZ25lZCBpbnQgIGM7CiAgdW5zaWduZWQgaW50ICBkOwogIHVuc2ln
bmVkIGludCAgZTsKICB1bnNpZ25lZCBpbnQgIGY7CiAgdW5zaWduZWQgaW50ICBnOyAgCgogIHN0
cnVjdCBhX2xpbmtfc3RydWN0ICpuZXh0OwogICAgICAKICB2b2lkICAgICAgICAqICBpOyAgCiAg
dW5zaWduZWQgaW50ICAgajsKICB1bnNpZ25lZCBzaG9ydCBrOwogIHVuc2lnbmVkIGNoYXIgIGw7
CiAgdW5zaWduZWQgY2hhciAgbTsKICBzaWduZWQgICBjaGFyICBuOwp9CmFfbGluazsKCnR5cGVk
ZWYgc3RydWN0IEZyZWVMaXN0U3RydWN0CnsKICBpbnQgICAgICAgZHVtbXk7CiAgc3RydWN0IEZy
ZWVMaXN0U3RydWN0ICpuZXh0Owp9IEZyZWVMaXN0OwoKc3RydWN0IGxpc3Rfd2l0aF9GcmVlTGlz
dAp7CiAgaW50IGR1bW15OwogIGludCBkdW1teTI7CiAgRnJlZUxpc3QgICAgICAgICp2b2xhdGls
ZSBydEZyZWVMaXN0OyAvKiA8LS0gVm9sYXRpbGUgdHJpZ2dlcnMgdGhlIGJ1Zy4gKi8KfTsKCnN0
cnVjdCBsaXN0X3dpdGhfRnJlZUxpc3QgbGw7CgpzdGF0aWMgYV9saW5rICpmb3JjZV9nY2NfcHBj
X2J1Zyh2b2lkKTsKCnN0YXRpYwphX2xpbmsgKmZvcmNlX2djY19wcGNfYnVnKHZvaWQpCnsKICBG
cmVlTGlzdCAqZnJlZU5vZGU7CiAgYV9saW5rICAgICpsbms7CiAgCiAgIC8qIHBvcCBvbmUgbm9k
ZSAqLwogICBmcmVlTm9kZSA9IGxsLnJ0RnJlZUxpc3Q7CiAgIGxsLnJ0RnJlZUxpc3QgPSBsbC5y
dEZyZWVMaXN0LT5uZXh0OwogICBmcmVlTm9kZS0+bmV4dCA9IDA7CgogICBsbmsgICAgPSAoYV9s
aW5rICopIGZyZWVOb2RlOwogICBsbmstPmEgPSAweDEyMzQ7CiAgIGxuay0+bCA9IDB4MTI7Cgog
ICByZXR1cm4gbG5rOwp9Cgo=


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

end of thread, other threads:[~2002-07-09  8:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-09  1:47 optimization/7232: Incorrect code generate for volatiles and -O2 sirl
  -- strict thread matches above, loose matches on Subject: below --
2002-07-08  6:06 Franz Sirl
2002-07-08  5:36 svlu

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