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] Fix PR 55593


Hi Thomas,

> the attached patch fixes a regression introduced with the recent
> checking for DO loop variables when they are used with a generic
> subroutine where the generic name matches one of the actual names.
>
> Regression-tested.  OK for trunk?

A few questions about that patch:

-      f = co->symtree->n.sym->formal;

+      if (co->resolved_sym == NULL)
+    break;
+
+      f = co->resolved_sym->formal;


In which cases does it happen that "resolved_sym==NULL" ? Would it
make sense to do the following instead?

if (co->resolved_sym)
  f = co->resolved_sym->formal;
else
  f = co->symtree->n.sym->formal;

Or could we even use an "gfc_assert (co->resolved_sym)"?

Cheers,
Janus


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