[Bug fortran/32876] New: Wrongly accepts private items in public NAMELISTs
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Jul 24 13:43:00 GMT 2007
integer,private :: i
namelist /c/ i
is correctly diagnosed as invalid: "PRIVATE symbol '%s' cannot be member of
PUBLIC namelist at %L"; however, for derived types this fails. Note that NAG
f95 only gives an error for "B" and not for "A":
Error: mod.f90, line 14: PUBLIC NAMELIST /B/ has member T2 with PRIVATE
components
(I don't know in how far "A" is valid or what happens if T1 or T2 contains
other type(*)s which are private.)
module x
type tp1
integer, private :: i
end type tp1
type tp2
private
integer :: i
end type tp2
type(tp1) :: t1
type(tp2) :: t2
integer :: j1,j2
namelist /a/ t1,j
namelist /b/ t2,j
end module x
--
Summary: Wrongly accepts private items in public NAMELISTs
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32876
More information about the Gcc-bugs
mailing list