On Sat, Apr 20, 2019 at 05:38:34PM +0200, Dominique d'Humières wrote: > > The changes in gfortran.dg/submodule_22.f08 look weird: > (1) is the error in the CONTAINS of a SUBMODULE invalid? > From > > * decl.c (in_module_or_interface): New function to check that the > current state is in a module, submodule, or interface. > > it should not, should it? > > (2) left over? > + > +found outside of a module >
It's a sequence of run-on errors. The first statement in the original code is rejected with a syntax error. When that happenrs gfc_current_state() is not COMP_MODULE, COMP_SUBMODULE, or COMP_INTERFENCE. The next line has the MODULE prefix, and the new check finds that it occurs outside of MODULE, SUBMODULE, and INTERFERENCE, so a new error occurs. The remaining errors are then found to be bogus assignments. My conclusion, if the first error is fixed, then the run-on errors don't happen. If you rather fix the problems with '! dg-options "-fmax-errors=1"' I'm fine with that. -- Steve