This is the mail archive of the
java-discuss@sources.redhat.com
mailing list for the Java project.
Re: GCJ Bug accessing field of inner class (gcc version 2.97 20010117)
- To: Barnet Wagman <wagman at enteract dot com>
- Subject: Re: GCJ Bug accessing field of inner class (gcc version 2.97 20010117)
- From: Mark Wielaard <mark at klomp dot org>
- Date: Fri, 19 Jan 2001 12:13:17 +0100
- Cc: "java-discuss at sources dot redhat dot com" <java-discuss at sources dot redhat dot com>
- References: <3A67BAE6.8AAD8DE3@enteract.com>
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