java/8939: Class files produced by gcj are incompatible with Sun's vm
Tom Tromey
tromey@redhat.com
Tue Dec 31 00:56:00 GMT 2002
The following reply was made to PR java/8939; it has been noted by GNATS.
From: Tom Tromey <tromey@redhat.com>
To: bhun@chello.nl
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: java/8939: Class files produced by gcj are incompatible with Sun's vm
Date: 31 Dec 2002 01:48:47 -0700
I looked at this PR a bit tonight.
I believe the bytecode in question is this (I think this is the only
invokespecial that could be considered incorrect):
395: invokespecial #223=<Method org.apache.tools.ant.taskdefs.Tar$TarCompressionMethod.compress (java.io.OutputStream)java.io.OutputStream>
I believe this code in jcf-write.c is at fault:
else if (DECL_CONSTRUCTOR_P (f) || CALL_USING_SUPER (exp)
|| METHOD_PRIVATE (f))
OP1 (OPCODE_invokespecial);
I don't currently understand why this particular bytecode is
considered invalid by the JDK. The method in question is in fact
private. Most likely there is a special member class rule here that
I'm unaware of; more research required. (Another possibility is that
I'm on the wrong track here. It would help if you could send a
correct Tar.class as compiled by javac...)
Tom
More information about the Gcc-prs
mailing list