https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90166
--- Comment #2 from Steve Kargl <sgk at troutmask dot apl.washington.edu> --- On Thu, Apr 18, 2019 at 11:55:51PM +0000, sgk at troutmask dot apl.washington.edu wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90166 > > --- Comment #1 from Steve Kargl <sgk at troutmask dot apl.washington.edu> --- > ndex: decl.c > =================================================================== > --- decl.c (revision 270181) > +++ decl.c (working copy) > @@ -7598,6 +7598,13 @@ gfc_match_subroutine (void) > if (m != MATCH_YES) > return m; > > + if (current_attr.module_procedure == 1 > + && gfc_current_state () != COMP_MODULE) This isn't quite right. A module subroutine can appear in an interface statement.