(j3.2006) C1293 and the VALUE attribute
Van Snyder
Van.Snyder
Wed Apr 2 15:56:07 EDT 2014
C1293 [316:7-19] says
"In a pure subprogram any designator with a base object that is in
common or accessed by host or use association, is a dummy argument of a
pure function, is a dummy argument with the INTENT (IN) attribute, is a
coindexed object, or an object that is storage associated with any such
variable, shall not be used
(1) in a variable definition context (16.6.7),
(2) as the data-target in a pointer-assignment-stmt ,
(3) as the expr corresponding to a component with the POINTER attribute
in a structure-constructor ,
(4) as the expr of an intrinsic assignment statement in which the
variable is of a derived type if the
derived type has a pointer component at any level of component
selection,
(5) as the source-expr in a SOURCE= clause if the designator is of a
derived type that has an ultimate
pointer component, or
(6) as an actual argument corresponding to a dummy argument with INTENT
(OUT) or INTENT
(INOUT) or with the POINTER attribute.
C1282 [315:30-31] says
"The specification-part of a pure function subprogram shall specify that
all its nonpointer dummy data objects have the INTENT (IN) or the VALUE
attribute."
There's no constraint that says a dummy argument of a pure function
cannot have the TARGET attribute, but C1293(2) effectively makes that
combination pointless. Did we really intend that a dummy argument of a
pure function cannot be the data-target in a pointer-assignment-stmt if
it has the VALUE and TARGET attributes? None of the other items in the
list in C1293 appear to make sense for a dummy argument of a pure
function that has the VALUE attribute. If none of them make sense, we
could delete "is a dummy argument of a pure function" from C1293,
relying instead on "is a dummy argument with the INTENT(IN) attribute"
or just "has the INTENT(IN) attribute" since nothing but dummy arguments
can have the INTENT(IN) attribute.
More information about the J3
mailing list