To: J3 J3/20-158r3 From: Gary Klimowicz Subject: Technical issues UTI-005 and UTI-006 in DO CONCURRENT REDUCE Date: 2020-October-13 Reference: 19-252r2, 20-007 Background ========== In F202x, we added a new locality clause, REDUCE. In UTI-005, the editor noticed that the bounds of a REDUCE variable with the POINTER attribute is not defined. We propose an edit to correct this. In UTI-006, the editor pointed out that REDUCE entities carry along the POINTER attribute of the outer entity uselessly. The suggestion is to use semantics similar to associate names. An edit is proposed. Also, the construct entity can no longer have the POINTER attribute, so its pointer association can't be changed. The proposed edits lead to a slight reorganization of the new and remaining sentences for clarity. Edits to 20-007r1 ================= { edits in page order } { 11.1.7.5 Additional semantics for DO CONCURRENT constructs } { UTI-005 Add bounds to attributes shared with the outer entity } [190:22-24 p3] Replace "same type, type parameters, and rank" with "same type, type parameters, rank, and bounds" { the construct has the same bounds as the outer entity } { From plenary: Provide context to the meaning of "outside variable" } [190:24 p3] Replace "CONCURRENT construct" with "CONCURRENT construct (the outside variable)" { The "outside variable" is identified } { From plenary: REDUCE variables should behave like temporaries } [190:25 p3] Replace "CONTIGUOUS, POINTER, or TARGET attribute with "CONTIGUOUS attribute" [190:26 p3] Replace "; it does not have the ALLOCATABLE, BIND, INTENT, PROTECTED, SAVE" with ". It does not have the ALLOCATABLE, BIND, INTENT, PROTECTED, SAVE, TARGET" { The construct entity is stripped of meaningless attributes } { UTI-005 Remove unnecessary reference to bounds } [190:27-28 p3] Delete the sentence "If it is not a pointer, it has the same bounds as the outside variable." { remove exclusion of bounds when outside entity has POINTER attribute } { For clarity: Put sentences about outside variable together } [190:28-29 p3] Move "The outside variable shall not be an unallocated allocatable variable or a pointer that is not associated." before the previous sentence "The construct entity has the..." { Two sentences about the outside variable are together } { UTI-006 Remove unnecessary reference to pointer association } [190:30-31 p3] Delete sentence 6 "The pointer association of the construct entity shall not be changed within the DO CONCURRENT construct." { Reference to changing pointer association is deleted } { The complete paragraph } [190:22-32] The new paragraph with edits applied should read as follows: "A variable that has REDUCE locality is a construct entity with the same type, type parameters, rank, and bounds as the variable with the same name in the innermost executable construct or scoping unit that includes the DO CONCURRENT construct (the outside variable). The outside variable is inaccessible by that name within the construct. The outside variable shall not be an unallocated allocatable variable or a pointer that is not associated. The construct entity has the CONTIGUOUS attribute if and only if the outside variable has that attribute. It does not have the ALLOCATABLE, BIND, INTENT, POINTER, PROTECTED, SAVE, TARGET, or VALUE attribute, even if the outside variable has that attribute. At the beginning of execution of each iteration, the construct entity is assigned an initial value corresponding to its reduce-operation as specified in Table 11.1." [190:32+] Delete UTI-005. [191:before line 1] Delete UTI-006. { end }