public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/41585]  New: [OOP] Reject CLASS(T) as component of "TYPE :: T"
@ 2009-10-05 13:22 burnus at gcc dot gnu dot org
  2009-10-05 13:27 ` [Bug fortran/41585] " burnus at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-10-05 13:22 UTC (permalink / raw)
  To: gcc-bugs

type t
  integer :: i
  class(t), allocatable :: foo
end type t

In Fortran 2003 this is invalid to have CLASS(T) in the same TYPE as the one
being defined. I think Fortran 2008 allows this, but as currently, deallocating
also does not work, I would simply reject it.


C438 (R440) If the POINTER attribute is not specified for a component, the
declaration-type-spec in the component-def-stmt shall be CLASS(*) or shall
specify an intrinsic type or a previously defined derived type.

C439 (R440) If the POINTER attribute is specified for a component, the
declaration-type-spec in the component-def-stmt shall be CLASS(*) or shall
specify an intrinsic type or any accessible derived type including the type
being defined.


-- 
           Summary: [OOP] Reject CLASS(T) as component of "TYPE :: T"
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          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=41585


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

end of thread, other threads:[~2009-10-09 22:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-05 13:22 [Bug fortran/41585] New: [OOP] Reject CLASS(T) as component of "TYPE :: T" burnus at gcc dot gnu dot org
2009-10-05 13:27 ` [Bug fortran/41585] " burnus at gcc dot gnu dot org
2009-10-07 21:50 ` janus at gcc dot gnu dot org
2009-10-09 22:35 ` janus at gcc dot gnu dot org
2009-10-09 22:39 ` janus 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).