This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: java/8939: Class files produced by gcj are incompatible with Sun's vm
- From: Tom Tromey <tromey at redhat dot com>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 31 Dec 2002 08:56:01 -0000
- Subject: Re: java/8939: Class files produced by gcj are incompatible with Sun's vm
- Reply-to: Tom Tromey <tromey at redhat dot com>
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