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