This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, Fortran, F03] PR 40870: include formal args in backend_decl of PPCs
- From: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- To: Janus Weil <janus at gcc dot gnu dot org>
- Cc: gfortran <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 4 Aug 2009 11:28:57 +0200
- Subject: Re: [Patch, Fortran, F03] PR 40870: include formal args in backend_decl of PPCs
- References: <854832d40908031315t50eee9a5sff87f1505aced93c@mail.gmail.com>
Dear Janus,
> 2009-08-03 ?Janus Weil ?<janus@gcc.gnu.org>
>
> ? ? ? ?PR fortran/40870
> ? ? ? ?* trans-types.c (gfc_typenode_for_spec): Prevent infinite recursion loop
> ? ? ? ?if a PPC has a derived-type formal arg.
This does not look right to me because you are shorting out
(gfc_get_derived_type):
/* derived->backend_decl != 0 means we saw it before, but its
components' backend_decl may have not been built. */
if (derived->backend_decl)
{
/* Its components' backend_decl have been built. */
if (TYPE_FIELDS (derived->backend_decl))
return derived->backend_decl;
else
typenode = derived->backend_decl;
}
Has this test become unnecessary for some reason or had you better
test for the TYPE_FIELDS in the bit that you introduced above?
Anyway, try the attached for size - it bootstraps and regtests on
x86_64/FC9.
The rest of the patch looks fine.
Thanks for the patch!
Paul