This is the mail archive of the java-discuss@sources.redhat.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GCJ Bug accessing field of inner class (gcc version 2.97 20010117)


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]