This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgcj/24321] New: instanceof erroneously causes class initialization
- From: "tromey at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Oct 2005 21:59:07 -0000
- Subject: [Bug libgcj/24321] New: instanceof erroneously causes class initialization
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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