The following code creates a user defined classloader which is then used to load a simple class C from byte code. An instance of this class is created and from this instance Class.forName("C") is called. This should result in the same class object from the same (user defined) classloader.
It does work when compiled to native code. But it fails when compiled to byte code and run with gij. With gij 3.4 it works correctly. Current CVS gcj (GCC) 4.0.0 20041016 (experimental) fails Expected output: true true true -- Summary: Bad interaction between interpreter and Class.forName() Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: libgcj AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: mark at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu dot org GCC host triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18036