(j3.2006) Is 7.2.1.2p1(1) necessary?

Van Snyder van.snyder
Thu Mar 12 00:53:00 EDT 2015


On Thu, 2015-03-12 at 13:44 +0900, Malcolm Cohen wrote:
> >7.2.1.2p1(1) says "if the variable is polymorphic it shall be
> >allocatable and not a coarray."
> 
> Yes, this is necessary.
> 
> >Would it be enough
> >to require that if it is not allocatable, variable and expr shall have
> >the same dynamic type?
> 
> Not compile-time checkable.
> 
> >So checking the
> >dynamic types, and raising an error condition if they're different,
> >isn't any more difficult that what's required now.
> 
> The whole point is to avoid raising error conditions since that crashes the 
> program!

If you know that the variable and expression have the same dynamic type,
the program won't crash.  Without relaxing 7.2.1.2p1(1) one cannot
assign to an element of a polymorphic array without a SELECT TYPE
construct.

> Cheers,





More information about the J3 mailing list