(j3.2006) nonpolymorphic allocation and the SOURCE= specifier

Robert Corbett robert.corbett
Wed Apr 11 20:39:42 EDT 2012


Suppose T is the name of an extensible type, NT is
a nonpolymorphic allocatable variable of type T,
and PT is a polymorphic allocatable variable whose
declared type is T.  The variables NT and PT are
type compatible because they are "entities of the
same declared type" (see paragraph 2 of
Clause 4.3.1.3).  Suppose the dynamic type of PT
is an extension of T.  Is the ALLOCATE statement

       ALLOCATE(NT, SOURCE=PT)

standard-conforming?  If not, which requirement
of the standard does it violate?  If it is
standard-conforming, what is its effect?

Robert Corbett



More information about the J3 mailing list