This is a regression from 3.3. First, compile the attached source with jikes. The problem isn't visible if you compile to .class with "gcj -C", as gcj generates the wrong invokespecial call for "super.dispose()". (I'll also attach a .jar file containing the classes as compiled with jikes). Then compile FieldEditorPreferencePage.class with "gcj -c". gcj generates a call to this method: U IPreferencePage.dispose() However, this is an interface method, so this call is clearly wrong. gcj 3.3 emits a call to: U DialogPage.dispose() This is still wrong, but less so -- at least it will work. Really we should emit a call to PreferencePage.dispose(). (This is especially true for binary compatibility.)
Created attachment 5264 [details] test case source file
Created attachment 5265 [details] jikes-compiled .class files
regression; fix for 3.4
Subject: Bug 13273 CVSROOT: /cvs/gcc Module name: gcc Changes by: aph@gcc.gnu.org 2004-01-16 17:11:11 Modified files: gcc/java : typeck.c java-tree.h jcf-parse.c decl.c ChangeLog Log message: 2004-01-16 Andrew Haley <aph@redhat.com> PR java/13273: * typeck.c (shallow_find_method): New. (find_method_in_superclasses): New. (find_method_in_interfaces): New. (lookup_do): Rewrite. * java-tree.h (SEARCH_ONLY_INTERFACE): Delete. * jcf-parse.c (read_class): Save and restore output_class. * decl.c (java_expand_body): Set output_class from fndecl. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/typeck.c.diff?cvsroot=gcc&r1=1.58&r2=1.59 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/java-tree.h.diff?cvsroot=gcc&r1=1.193&r2=1.194 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/jcf-parse.c.diff?cvsroot=gcc&r1=1.156&r2=1.157 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/decl.c.diff?cvsroot=gcc&r1=1.175&r2=1.176 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/ChangeLog.diff?cvsroot=gcc&r1=1.1314&r2=1.1315
Fixed for 3.4.