public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/18868] New: Interface containing anonymous class breaks gij
@ 2004-12-07 13:20 steph at tangency dot co dot uk
  2004-12-07 13:24 ` [Bug java/18868] " konqueror at gmx dot de
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: steph at tangency dot co dot uk @ 2004-12-07 13:20 UTC (permalink / raw)
  To: java-prs

The following construct seems to have issues with gij (3.4 and 4.0) but works ok
with kaffe and jamvm (output lower down)

public class C {
  public static void main(String[] arg) {
    System.err.println(A.instance);
    System.err.println(A.instance.getInstance());
  }
}
 
interface A {
  public static A instance = new A() {
    public A getInstance() {
      return instance;
    }
  };
 
  public abstract A getInstance();
}

JamVM output:

mkoch@asterix ~> jamvm C
A$1@401ff580
A$1@401ff580

GIJ-3.4 output:
mkoch@asterix ~> gij-3.4 C
A$1@8093f68
Exception in thread "main" java.lang.IncompatibleClassChangeError: field
A$1.instance was not found.
   at _Jv_ResolvePoolEntry(java.lang.Class, int) (/usr/lib/libgcj.so.5.0.0)
   at A$1.getInstance() (Unknown Source)
   at C.main(java.lang.String[]) (Unknown Source)
mkoch@asterix ~> /home/mkoch/local/gcc-
gcc-3.4-debian  gcc-4.0         gcc-awt

GIJ-4.0 output:
mkoch@asterix ~> /home/mkoch/local/gcc-4.0/bin/gij-4.0 C
A$1@80b0f28
Exception in thread "main" java.lang.IncompatibleClassChangeError: field
A$1.instance was not found.
   at _Jv_Linker.resolve_pool_entry(java.lang.Class, int)
(/home/mkoch/local/gcc-4.0/lib/libgcj.so.6.0.0)
   at A$1.getInstance() (Unknown Source)
   at C.main(java.lang.String[]) (Unknown Source)

Kaffe output:
mkoch@asterix ~> kaffe C
A$1@83a1460
A$1@83a1460
mkoch@asterix ~>

-- 
           Summary: Interface containing anonymous class breaks gij
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: konqueror at gmx dot de
        ReportedBy: steph at tangency dot co dot uk
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

end of thread, other threads:[~2005-01-10 19:25 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-07 13:20 [Bug java/18868] New: Interface containing anonymous class breaks gij steph at tangency dot co dot uk
2004-12-07 13:24 ` [Bug java/18868] " konqueror at gmx dot de
2004-12-07 13:55 ` konqueror at gmx dot de
2004-12-07 13:58 ` aph at gcc dot gnu dot org
2004-12-07 19:58 ` [Bug libgcj/18868] " tromey at gcc dot gnu dot org
2004-12-07 20:08 ` tromey at gcc dot gnu dot org
2004-12-07 20:20 ` tromey at gcc dot gnu dot org
2005-01-05 23:19 ` tromey at gcc dot gnu dot org
2005-01-10 19:21 ` cvs-commit at gcc dot gnu dot org
2005-01-10 19:23 ` tromey at gcc dot gnu dot org
2005-01-10 19:25 ` 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).