(j3.2006) nonpolymorphic allocation and the SOURCE= specifier
Malcolm Cohen
malcolm
Wed Apr 11 21:47:49 EDT 2012
As is, it is not conforming under clause 1 because the standard does not
establish an interpretation for it. That's not really a satisfactory situation.
(The standard gets to contradict itself on the way too, that is very
unsatisfactory.)
It is clearly conforming if NT and PT have the same dynamic type.
I think that it ought to be conforming. Given the behaviour of ALLOCATE with
SOURCE= and differing type parameter values, I would think that PT not having
the dynamic type of NT should raise an error condition in the ALLOCATE
statement.
However an interp should be raised to sort it out.
Cheers,
-----Original Message-----
From: Robert Corbett
Date: ?? 24?4?12? 9:39
To: j3 at j3-fortran.org
Subject: (j3.2006) nonpolymorphic allocation and the SOURCE= specifier
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
_______________________________________________
J3 mailing list
J3 at j3-fortran.org
http://j3-fortran.org/mailman/listinfo/j3
________________________________________________________________________
This e-mail has been scanned for all viruses by Star.
________________________________________________________________________
--
................................Malcolm Cohen, Nihon NAG, Tokyo.
More information about the J3
mailing list