GCJ Bug accessing field of inner class (gcc version 2.97 20010117)
Mark Wielaard
mark@klomp.org
Fri Jan 19 03:13:00 GMT 2001
On Thu, Jan 18, 2001 at 09:56:23PM -0600, Barnet Wagman wrote:
> GCJ appears to be unable to access the field of an inner class from
> within a different class. Here's a simple example:
> [...]
>> After compiling with gcj, gcc version 2.97 20010117 (experimental),
> running it yields
>> In HasInnerClass(), ic0.s = A
> stringggggggggggggggggggggggggggggggggggggggg
> Out of Memory! Returning NIL!
>> instead of
>> In HasInnerClass(), ic0.s = A
> stringggggggggggggggggggggggggggggggggggggggg
> In UsesInnerClass(), hic.ic0.s = A
> stringggggggggggggggggggggggggggggggggggggggg
>>> Is this a known bug?
I am using 'gcc version 2.97 20010117 (experimental) from CVS
and everything works for me:
$ gcj --main=A.UsesInnerClass A/HasInnerClass.java A/UsesInnerClass.java
$ ./a.out
In HasInnerClass(), ic0.s = A stringggggggggggggggggggggggggggggggggggggggg
In UsesInnerClass(), hic.ic0.s = A stringggggggggggggggggggggggggggggggggggggggg
I have no idea where that 'Out of Memory! Returning NIL!' is coming from
that you see when running the program.
Cheers,
Mark
More information about the Java
mailing list