------- Additional Comments From mckinlay at redhat dot com 2005-03-10 01:29 ------- This is failing because the bytecode in this .jar really is broken:
public class Test { public static void main(String[] args) throws Exception { Class f = Class.forName("org.eclipse.jface.util.OpenStrategy$1"); System.out.println (f); } } $ java Test Exception in thread "main" java.lang.VerifyError: (class: org/eclipse/jface/util/OpenStrategy$1, method: handleEvent signature: (Lorg/eclipse/swt/widgets/Event;)V) Register 2 contains wrong type at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:164) at Test.main(Test.java:7) However, its questionable whether gcj should actually report this error with --indirect-dispatch. The verifier is correctly deferring this type check to runtime via a type assertion but code in expr.c is still doing its own check (hangover from the old verifier, I guess). Then again its probably a reasonable assumption to make that java.lang.Object is never assignment-compatible to anything else. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13378