Consider this program: public class iof { static class Z { static { System.out.println("init"); } }
public static Object x () { return new Object(); } public static void main(String[] args) { System.out.println(x() instanceof Z); } } With gcj this prints "init". With the JDK it does not. -- Summary: instanceof erroneously causes class initialization Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: libgcj AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tromey at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24321