https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105594
Bug ID: 105594 Summary: -Wuse-without-only issued for any submodule Product: gcc Version: 11.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: everythingfunctional at protonmail dot com Target Milestone: --- The -Wuse-without-only option issues a warning when compiling any submodule. This is incorrect as a submodule statement is not a use statement, and cannot contain an only qualifier. For example the source code module foo_m interface module subroutine foo end subroutine end interface end module submodule (foo_m) foo_s contains module procedure foo end procedure end submodule when compiled like $ gfortran -c -Wuse-without-only foo_m.f90 foo_m.f90:8:17: 8 | submodule (foo_m) foo_s | 1 Warning: USE statement at (1) has no ONLY qualifier [-Wuse-without-only]