public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/32876]  New: Wrongly accepts private items in public NAMELISTs
@ 2007-07-24 13:43 burnus at gcc dot gnu dot org
  2007-07-25  5:13 ` [Bug fortran/32876] " pault at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-07-24 13:43 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-07-28  8:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-24 13:43 [Bug fortran/32876] New: Wrongly accepts private items in public NAMELISTs burnus at gcc dot gnu dot org
2007-07-25  5:13 ` [Bug fortran/32876] " pault at gcc dot gnu dot org
2007-07-25 17:57 ` dfranke at gcc dot gnu dot org
2007-07-25 18:09 ` burnus at gcc dot gnu dot org
2007-07-28  8:51 ` dfranke at gcc dot gnu dot org
2007-07-28  8:54 ` dfranke at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).