https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109218
Bug ID: 109218 Summary: "MODULE SUBROUTINE" wrongly accepted where MODULE prefix is not permitted. Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: accepts-invalid Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org CC: juergen.reuter at desy dot de Target Milestone: --- Reported at bug 109209 comment 9: > (In reply to Jürgen Reuter from bug 109209 comment #4) module resonances ... contains ... > > module subroutine t3_set_expand (res_set) ... > > Actually, the 'module subroutine' here needs to be just 'subroutine'. > gfortran accepts this, nagfor doesn't. * * * This probably violates one of the 'prefix' constraints of Fortran 2018, C1547 to C1551. I think it violates: C1548 (R1526) If MODULE appears in the prefix of a module subprogram, it shall have been declared to be a separate module procedure in the containing program unit or an ancestor of that program unit. * * * Testcase: bug 109209 comment 4