public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/27812]  New: Classpath AWT Demo: anonymous class call miscompilation
@ 2006-05-29 22:39 mckinlay at redhat dot com
  2007-01-09 20:56 ` [Bug java/27812] " tromey at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: mckinlay at redhat dot com @ 2006-05-29 22:39 UTC (permalink / raw)
  To: gcc-bugs

GCJ miscompiles part of the classpath AWT demo application in:

classpath/examples/gnu/classpath/examples/awt/Demo.java

In an anonoymous inner class ActionListener implementation, an unqualified call
to a superclass of the outer class is called on "this" instead of the outer
class.

This happens with either source->native or source->bytecode compilation.

class Super
{
    void dispose()
    {
      System.out.println("OK");
    }
}

public class PR27812
{
  public static void main(String[] args)
  {
    Y y = new Y();
    y.y();
  }

  static interface I
  {
    abstract void actionPerformed();
  }

  static class Y extends Super
  {
    void y()
    {
      new I () {
          public void actionPerformed () {
            dispose();
          }
        }.actionPerformed();
    }
  }
}

$ gcj -C PR27812.java
$ gij PR27812
Exception in thread "main" java.lang.NoSuchMethodError: method
PR27812$Y$1.dispose with signature ()V was not found.
   at PR27812$Y$1.actionPerformed (PR27812.java:28)
   at PR27812$Y.y (PR27812.java:30)
   at PR27812.main (PR27812.java:14)


-- 
           Summary: Classpath AWT Demo: anonymous class call miscompilation
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mckinlay at redhat dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27812


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

* [Bug java/27812] Classpath AWT Demo: anonymous class call miscompilation
  2006-05-29 22:39 [Bug java/27812] New: Classpath AWT Demo: anonymous class call miscompilation mckinlay at redhat dot com
@ 2007-01-09 20:56 ` tromey at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-01-09 20:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from tromey at gcc dot gnu dot org  2007-01-09 20:48 -------
All gcj front end bugs have been fixed by the gcj-eclipse branch merge.
I'm mass-closing the affected PRs.
If you believe one of these was closed in error, please reopen it
with a note explaining why.
Thanks.


-- 

tromey at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.3.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27812


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

end of thread, other threads:[~2007-01-09 20:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-29 22:39 [Bug java/27812] New: Classpath AWT Demo: anonymous class call miscompilation mckinlay at redhat dot com
2007-01-09 20:56 ` [Bug java/27812] " tromey 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).