This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/36251] New: PUBLIC and PRIVATE abuse
- From: "kargl at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 May 2008 20:25:41 -0000
- Subject: [Bug fortran/36251] New: PUBLIC and PRIVATE abuse
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
gfortran compiles the following
module a
implicit none
integer :: i = 42
end module a
module b
use a
implicit none
private
public a ! <-- Is this legal? Can change to private, too.
end module b
program c
use b
implicit none
end program c
Lahey's syntax checker gives
Lahey/Fujitsu Fortran 95 Source Check Output
Compiling program unit a at line 1:
Compiling program unit b at line 5:
1725-S: "SOURCE.F90", line 10, column 10: 'a' already used as a module name.
--
Summary: PUBLIC and PRIVATE abuse
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kargl at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36251