This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [Patch] PR java/21418: Order of files on command line matters while resolving inheritance
- From: Ranjit Mathew <rmathew at gmail dot com>
- To: Andrew Haley <aph at redhat dot com>
- Cc: GCJ Patches <java-patches at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>, mark at klomp dot org
- Date: Wed, 21 Sep 2005 15:56:14 +0530
- Subject: Re: [Patch] PR java/21418: Order of files on command line matters while resolving inheritance
- References: <43312D9C.4090105@gmail.com> <17201.12613.295312.297706@zapata.pink>
- Reply-to: rmathew at gmail dot com
On 9/21/05, Andrew Haley <aph@redhat.com> wrote:
> > + super_class = CLASSTYPE_SUPER (type1);
> > +
> > + if (super_class && TREE_CODE (super_class) == POINTER_TYPE)
>
> I don't quite understand this test for POINTER_TYPE.
If the super class hasn't yet been laid out, CLASSTYPE_SUPER
returns a POINTER_TYPE representing the super class instead
of the proper RECORD_TYPE. Now I don't know whether this is
a bug or a feature, but this is what I discovered under a debugger
and if I look at the while loop surrounding this code, only a
RECORD_TYPE seems kosher.
If you look at the code in maybe_layout_super_class(), when
faced with a POINTER_TYPE for a class, it tries to resolve
the class first.
Ranjit.
--
Ranjit Mathew Email: rmathew AT gmail DOT com
Bangalore, INDIA. Web: http://ranjitmathew.hostingzero.com/