J3/14-137r1 To: J3 Subject: C1296 (constraint on pure subprograms) From: Van Snyder Date: 2014 May 29 1. Introduction =============== C1296 [14-007r1:314:28-315:2] 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 in a , (3) as the corresponding to a component with the POINTER attribute in a , (4) as the 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 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 requires a dummy argument of a pure function to have the INTENT(IN) or VALUE attribute. C1296 fortunately does not constrain local variables of pure subprograms. Dummy arguments with the VALUE attribute are effectively local variables. Therefore, for a dummy argument of a pure function that has the VALUE attribute, there is no problem that is solved by C1296. Therefore, it is enough for C1296 to have "is a dummy argument with the INTENT(IN) attribute". It doesn't need "is a dummy argument of a pure function". Most of the prohibition in item (6) against appearing as an actual argument corresponding to a dummy argument with the INTENT(OUT) or INTENT(INOUT) attribute duplicates 16.6.7p1(12), which is cited in item (1). 2. Edits to 14-007r1 ==================== [xviii:Somewhere in the intro concerning extensions] " o A dummy argument of a pure procedure may appear in variable definition and similar contexts if it has the VALUE attribute and does not have the INTENT(IN) attribute." [314:29] Delete ", is a dummy argument of a pure function" [314:30] Insert "is" before "an" (for consistency with the rest of the sentence). [314:37] Replace "clause" with "specifier". [315:1-2] Delete "with INTENT(OUT) or INTENT(INOUT) or" because it duplicates 16.6.7p1(12).