This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/47203] New: USE of module with same name as SUBROUTINE not reject, but also not working
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 7 Jan 2011 09:25:32 +0000
- Subject: [Bug fortran/47203] New: USE of module with same name as SUBROUTINE not reject, but also not working
- Auto-submitted: auto-generated
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: unassigned@gcc.gnu.org
ReportedBy: burnus@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