http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47203
Summary: USE of module with same name as SUBROUTINE not reject, but also not working Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: accepts-invalid, diagnostic Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: bur...@gcc.gnu.org The following program is accepted by gfortran but rejected by - NAG: "Module M USEs itself" - g95: "PROCEDURE attribute conflicts with MODULE attribute at (1)" - ifort: "This global name is invalid in this context. [M]" Even if one assumes that the code is valid, it does not work as the example in bug 46313 comment 7 shows: It fails with a bogus error message. module m end module m call m contains subroutine m() use m end subroutine m end