https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68243
Bug ID: 68243 Summary: QOI: no warning about unused entities in submodules Product: gcc Version: 6.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: mar...@mpa-garching.mpg.de Target Milestone: --- Created attachment 36665 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36665&action=edit test case When compiling the attached test case with current gfortran trunk, it emits the warnings: martin@marvin ~/tmp $ gfortran -W -Wall -c test.f08 test.f08:12:17: integer unused1 1 Warning: Unused PRIVATE module variable ‘unused1’ declared at (1) [-Wunused-value] test.f08:16:0: subroutine unused2 Warning: ‘unused2’ defined but not used [-Wunused-function] But the unused entities "unused3" and "unused4" in the submodule are not mentioned. As far as I can tell, they are invisible outside the submodule, and should therefore be provably unused.