This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, Fortran, F03] PR 40870: include formal args in backend_decl of PPCs


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


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