gcj 4.1.x issue

Mark Wielaard mark@klomp.org
Thu Dec 22 16:17:00 GMT 2005


Hi Hanno,

On Thu, 2005-12-22 at 16:48 +0100, Mark Wielaard wrote:
> > The source compiles but executing gij with the class files breaks.
> > I narrowed down the error to a testcase I would say.
> > Java file is attached.
> > 
> > # gcj -C DemuxOutputStream.java
> > # gij -cp . DemuxOutputStream
> > Exception in thread "main" java.lang.IllegalAccessError: DemuxOutputStream: DemuxOutputStream$BufferInfo.buffer
> >    at DemuxOutputStream.main (DemuxOutputStream.java:18)

In this case it really does seem a bug in gcj -C byte code generation.
Since this is a static inner class it should create an (package private)
accessor method for the private ByteArrayOutputStream buffer field.
(jikes does this correctly btw.) A workaround is to just remove the
private flag from the buffer field in this case.

Cheers,

Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://gcc.gnu.org/pipermail/java/attachments/20051222/b361352c/attachment.sig>


More information about the Java mailing list