This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/41585] New: [OOP] Reject CLASS(T) as component of "TYPE :: T"
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Oct 2009 13:22:12 -0000
- Subject: [Bug fortran/41585] New: [OOP] Reject CLASS(T) as component of "TYPE :: T"
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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