On Thu, Jun 18, 2015 at 08:26:19PM +0200, Mikael Morin wrote: > Hmm, for gfc_derived_types at least, I would say no. > gfc_derived_types seems to be a per root namespace global, in other > words shared between contained procedures, so it should not be > saved/restored upon resolution of sibling or internal procedures. > And I don't think it's possible to escape one root namespace; > use-associated symbols are not shared with the corresponding module > symbols for example. > So we are (quite) safe here, I think.
Ok. > To be honest, I'm not at ease with these globals, both openmp and > derived_types, and I'm not fond of starting resolution of a different > procedure in the middle of nowhere. I can try to produce a patch that > walks the procedure code to pick the needed information instead of doing > full procedure resolutions at arbitrary places, if that seems worth it. > Or try to remove gfc_derived_types. But IMHO the patch proposed here > makes sense in any case. If the patch passes regtest (both check-gfortran and libgomp fortran.exp), then it is ok for trunk/5 branch. Jakub