To: J3 J3/20-158r2 From: Gary Klimowicz Subject: Technical issues UTI-005 and UTI-006 in DO CONCURRENT REDUCE Date: 2020-October-12 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. 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] A variable that has REDUCE locality is a construct entity with the same type, type parameters, and rank as the variable with the same name in the innermost executable construct or scoping unit that includes the DO CONCURRENT construct, and the outside variable is inaccessible by that name within the construct. In sentence one of paragraph 3, line 22, replace "same type, type parameters, and rank" with "same type, type parameters, rank, and bounds" so that the first sentence of paragraph 3 reads: "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, and the outside variable is inaccessible by that name within the construct." { the construct has the same bounds as the outer entity } { UTI-006 POINTER REDUCE variables should behave like TARGET } [190:24-27 p3] Sentence two now reads "The construct entity has the CONTIGUOUS, POINTER, or TARGET attribute if and only if the outside variable has that attribute; it does not have the ALLOCATABLE, BIND, INTENT, PROTECTED, SAVE, or VALUE attribute, even if the outside variable has that attribute." Change this to 3 sentences: "The construct entity has the CONTIGUOUS attribute if and only if the outside variable has that attribute. It has the TARGET attribute if and only if the outside variable has either the TARGET or POINTER attribute. It does not have the ALLOCATABLE, BIND, INTENT, POINTER, PROTECTED, SAVE, or VALUE attribute, even if the outside variable has that attribute." { POINTER attribute in outer variable becomes TARGET in construct entity } { UTI-005 Remove unnecessary reference to bounds } [190:27-28 p3] Sentence three of paragraph 3 reads: "If it is not a pointer, it has the same bounds as the outside variable." Delete this sentence. { remove exclusion of bounds when outside entity has POINTER attribute } { UTI-006 Remove unnecessary reference to pointer association } [190:30-31 p3] Sentence 6 reads "The pointer association of the construct entity shall not be changed within the DO CONCURRENT construct." The construct entity can no longer have the POINTER attribute, so its pointer association can't be changed. Delete sentence 6. { Reference to changing pointer association is deleted } { 11.1.7.5 Reorganize for clarity } On reflection, it makes sense to group all references to the attributes of the construct entity into a single paragraph, and begin a new paragraph when discussing execution of the iterations. The paragraph formerly known as 3 would become: [190:22-32] "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 has the TARGET attribute if and only if the outside variable and has either the TARGET or POINTER attribute. It does not have the ALLOCATABLE, BIND, INTENT, POINTER, PROTECTED, SAVE, 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." { each paragraph now has a specific purpose } [190:32+] Delete UTI-005. [191:before line 1] Delete UTI-006. { end }