This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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] ICE with PROCEDURE using a complicated interface (PR36322 & PR36275)


Janus Weil wrote:
I changed the patch again now, so that not just the pointer to "ts" is
copied (which would result in two symbols pointing to the same ts),
but all elements of ts are copied one by one.
I might be mistaken, but I think with yesterday's patch you were effectively doing the same: You copied all elements.

Unless I overlooked something, the following is equivalent to your patch:

         sym->ts = sym->ts.interface->ts;
         sym->attr.function = ifc->attr.function;
         sym->attr.subroutine = ifc->attr.subroutine;
         copy_formal_args (sym, ifc);

and much more readable. The question is whether one needs to additionally copy the gfc_charlen instead of only assigning the pointer, i.e. sym->ts.cl = gfc_get_charlen (); ... (and now one could continue with cl->length, cl->next etc.)

Tobias


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