public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/25379] New: gcj creates incorrect (byte-)code
@ 2005-12-12 21:54 jost2345 at users dot sourceforge dot net
2005-12-12 22:08 ` [Bug java/25379] " tromey at gcc dot gnu dot org
2005-12-12 22:10 ` pinskia at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: jost2345 at users dot sourceforge dot net @ 2005-12-12 21:54 UTC (permalink / raw)
To: java-prs
public abstract class bug {
protected void kill() {System.out.println("okay");}
protected abstract void init();
public static bug getBug() {return new bug(){protected void init()
{kill();}};}
public static void main(String s[]) { bug.getBug().init(); }
}
$ gcj -C bug.java
$ java bug # => NullPointerException
The above code will produce a null pointer exception because kill()
is not called via "invokevirtual" but referenced through "this", which
is not available in the above context.
--
Summary: gcj creates incorrect (byte-)code
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jost2345 at users dot sourceforge dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25379
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug java/25379] gcj creates incorrect (byte-)code
2005-12-12 21:54 [Bug java/25379] New: gcj creates incorrect (byte-)code jost2345 at users dot sourceforge dot net
@ 2005-12-12 22:08 ` tromey at gcc dot gnu dot org
2005-12-12 22:10 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: tromey at gcc dot gnu dot org @ 2005-12-12 22:08 UTC (permalink / raw)
To: java-prs
------- Comment #1 from tromey at gcc dot gnu dot org 2005-12-12 22:08 -------
What version of gcj are you using?
This seems to work fine for both 4.0 and 4.1.
--
tromey at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Summary|gcj creates incorrect |gcj creates incorrect
|(byte-)code |(byte-)code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25379
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug java/25379] gcj creates incorrect (byte-)code
2005-12-12 21:54 [Bug java/25379] New: gcj creates incorrect (byte-)code jost2345 at users dot sourceforge dot net
2005-12-12 22:08 ` [Bug java/25379] " tromey at gcc dot gnu dot org
@ 2005-12-12 22:10 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-12-12 22:10 UTC (permalink / raw)
To: java-prs
------- Comment #2 from pinskia at gcc dot gnu dot org 2005-12-12 22:10 -------
Fixed in 4.0.0, it fails for me in 3.4.0.
Closing as fixed for 4.0.0.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Known to fail| |3.4.0
Known to work| |4.0.0 4.1.0
Resolution| |FIXED
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25379
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-12-12 22:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-12 21:54 [Bug java/25379] New: gcj creates incorrect (byte-)code jost2345 at users dot sourceforge dot net
2005-12-12 22:08 ` [Bug java/25379] " tromey at gcc dot gnu dot org
2005-12-12 22:10 ` pinskia at gcc dot gnu dot org
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).