public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/59015] New: I/O of derived type with private component is forbidden
@ 2013-11-05 21:39 fxcoudert at gcc dot gnu.org
  2013-11-06  8:06 ` [Bug fortran/59015] I/O of PARAMETER " burnus at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2013-11-05 21:39 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59015

            Bug ID: 59015
           Summary: I/O of derived type with private component is
                    forbidden
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fxcoudert at gcc dot gnu.org

We should diagnose and prevent I/O of a derived-type object with one or more
private components. Example:

module foo
  type, public :: t
    private
    integer :: hidden
  end type t

  type(t), parameter, public :: v = t(42)
end module foo

program test
  use foo
  print *, v
end

This currently compiles and print 42. It should be rejected.


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

end of thread, other threads:[~2013-11-06 10:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-05 21:39 [Bug fortran/59015] New: I/O of derived type with private component is forbidden fxcoudert at gcc dot gnu.org
2013-11-06  8:06 ` [Bug fortran/59015] I/O of PARAMETER " burnus at gcc dot gnu.org
2013-11-06  9:45 ` fxcoudert at gcc dot gnu.org
2013-11-06 10:10 ` fxcoudert at gcc dot gnu.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).