[Patch, Fortran] ICE with PROCEDURE using a complicated interface (PR36322 & PR36275)
Tobias Burnus
burnus@net-b.de
Tue Jun 3 18:13:00 GMT 2008
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
More information about the Fortran
mailing list