public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* java/1412: gcj miscompiles some loops with -O2
@ 2000-12-20 12:26 jeff.sturm
  0 siblings, 0 replies; only message in thread
From: jeff.sturm @ 2000-12-20 12:26 UTC (permalink / raw)
  To: java-gnats

>Number:         1412
>Category:       java
>Synopsis:       gcj miscompiles some loops with -O2
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apbianco
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 20 12:19:40 PST 2000
>Closed-Date:    
>Last-Modified:  Mon Dec 11 15:30:01 PST 2000
>Originator:     jeff.sturm@commerceone.com
>Release:        001125
>Organization:
>Environment:
i686-pc-linux-gnu
>Description:
The attached test program, derived from java.util.Properties,
dumps core if compiled with -O2.
>How-To-Repeat:
Compile and run TestProperties.java with -O or higher.   If you
break on each iteration of the loop in gdb and do a "print $esp"
you'll see the stack pointer creeping.  Eventually it
overwrites the return address.
>Fix:

>Release-Note:
>Audit-Trail:

Formerly PR gcj/381


From: Bryce McKinlay <bryce@albatross.co.nz>
To: jeff.sturm@commerceone.com
Cc: java-gnats@sourceware.cygnus.com
Subject: Re: gcj/381: gcj miscompiles some loops with -O2
Date: Tue, 12 Dec 2000 11:23:24 +1300

 jeff.sturm@commerceone.com wrote:
 
 >> Synopsis:       gcj miscompiles some loops with -O2
 > 
 Yeah. This has always been a problem, even pre-2.95. Its the reason why 
 we can't turn on -O2 for compiling libgcj. It happens when you use 
 "continue" in a loop.
 
 See PR 161:
 
 http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view&pr=161&database=java
 
 regards
 
   [ bryce ]
 

From: Jeff Sturm <jeff.sturm@appnet.com>
To: Bryce McKinlay <bryce@albatross.co.nz>
Cc: java-gnats@sourceware.cygnus.com
Subject: Re: gcj/381: gcj miscompiles some loops with -O2
Date: Mon, 11 Dec 2000 18:26:10 -0500

 Bryce McKinlay wrote:
 > >> Synopsis:       gcj miscompiles some loops with -O2
 > Yeah. This has always been a problem, even pre-2.95. Its the reason why
 > we can't turn on -O2 for compiling libgcj. It happens when you use
 > "continue" in a loop.
 
 I didn't find the existing PR.  Thanks.
 
 It seems to me this is pretty important to get good performance out of libgcj.
 
 In the meantime I'll stick to compiling from bytecode, which seems to work fine.
 
 --
 Jeff Sturm
 jeff.sturm@commerceone.com
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="PropertiesTest.java"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="PropertiesTest.java"

aW1wb3J0IGphdmEuaW8uKjsKCnB1YmxpYyBjbGFzcyBQcm9wZXJ0aWVzVGVzdCB7CiAgICBwdWJs
aWMgdm9pZCBsb2FkKFN0cmluZ1JlYWRlciBpbikgdGhyb3dzIElPRXhjZXB0aW9uIHsKICAgICAg
ICBCdWZmZXJlZFJlYWRlciByZWFkZXIgPSBuZXcgQnVmZmVyZWRSZWFkZXIoaW4pOwogICAgICAg
IHdoaWxlICh0cnVlKSB7CgkJCVN0cmluZyBsaW5lID0gcmVhZGVyLnJlYWRMaW5lKCk7CgkJCWlm
IChsaW5lID09IG51bGwpCgkJCQlicmVhazsKICAgICAgICAgICAgaWYgKGxpbmUubGVuZ3RoKCkg
PT0gMCB8fCBsaW5lLnN0YXJ0c1dpdGgoIiMiKSkKICAgICAgICAgICAgCWNvbnRpbnVlOwoJCQlp
bnQgcG9zID0gbGluZS5pbmRleE9mKCc9Jyk7CgkJCVN0cmluZyBrZXkgPSAocG9zID49IDAgPyBs
aW5lLnN1YnN0cmluZygwLCBwb3MpIDogIiIpOwoJCQlTdHJpbmcgZWxlbWVudCA9IGxpbmUuc3Vi
c3RyaW5nKCsrcG9zKTsKICAgICAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKGtleSArICIsIiAr
IGVsZW1lbnQpOwogICAgICAgIH0KICAgIH0KCglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbihTdHJp
bmdbXSBhcmdzKSB7CgkJdHJ5IHsKCQkJUHJvcGVydGllc1Rlc3QgcHJvcHMgPSBuZXcgUHJvcGVy
dGllc1Rlc3QoKTsKCQkJcHJvcHMubG9hZChuZXcgU3RyaW5nUmVhZGVyKCIjIHRlc3QgcHJvcGVy
dGllc1xuIiArCgkJCQkiZm9vPWJhclxuIiArCgkJCQkiYmFyPWJhelxuIikpOwoJCX0gY2F0Y2gg
KFRocm93YWJsZSB0KSB7CgkJCXQucHJpbnRTdGFja1RyYWNlKCk7CgkJfQoJfQp9Cg==


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-12-20 12:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-20 12:26 java/1412: gcj miscompiles some loops with -O2 jeff.sturm

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