This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/47203] New: USE of module with same name as SUBROUTINE not reject, but also not working


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]