J3/16-106r1 To: J3 From: Dan Nagle Subject: attempting UTI 015 Date: 2016 February 10 Reference: 16-007 The Editor remarks that the attributes of names listed in LOCAL or LOCAL_INIT clauses are wrong. Specifically, some attributes are inconsistent with being a construct entity. Others may be expensive to implement for little apparent gain, or be so error-prone to use as to outweigh the benefits. The straw votes changed somewhat from those proposed in 16-106. Below is a summary: 1. Allocatable is to be disallowed. 2. Asynchronous and volatile are to be allowed, but transfers must be complete before loop ends. 3. Target is to be allowed, but a clear statement of pointer undefinition is needed. 4. Types with final procedures are to be disallowed 5. Undefinable variables are to be disallowed. UTI 015 is on pages 180-181 of 16-007. === Edits {these reflect Wednesday's straw votes} This is all within subclause 8.1.6.5 Additional Semantics for DO CONCURRENT constructs, [180:12-181:11] and concerns paragraph p2. (That is, the discussion of LOCAL and LOCAL_INIT.) [181:1] Replace "attributes" with "type, type parameters (if any), and bounds (if any)" {replace the erroneous attributes with necessary ones} [181:3] After the sentence that ends with "within the construct." add a paragraph break. After the paragraph break, add a new paragraph: "The variable with the same name as a variable with LOCAL or LOCAL_INIT locality that is in the innermost executable construct that includes the DO CONCURRENT construct is the outer variable. Additional rules apply to a variable that has LOCAL or LOCAL_INIT locality: o The variable has the ASYNCHRONOUS, CONTIGUOUS, POINTER or VOLATILE attribute(s) if and only if the outer variable has the attribute(s). o The variable does not have the BIND, INTENT, PROTECTED, SAVE, TARGET or VALUE attribute(s), even if the outer variable has the attribute(s). o The outer variable shall not have the ALLOCATABLE attribute or be of finalisable type. o If the outer variable cannot appear in a variable definition context, the LOCAL or LOCAL_INIT variable shall not appear in a variable definition context." {list the allowable and problematic attributes separately} [181:3+] add a new paragraph "If a variable that has LOCAL or LOCAL_INIT locality becomes an affector of a pending input/output operation, the operation shall have completed before the end of the iteration. If a variable has LOCAL or LOCAL_INIT locality and has the TARGET attribute, any pointers associated with it become undefined when the iteration of the construct completes execution." {clearly state the consequences of loop-scope variables} [181:5] delete "is allocatable it is unallocated, if it" from the bullet item. [181:6] delete the comma after "status" {make bullet item agree with preceding paragraphs} [181:7] change "allocation, pointer association, and definition" to "pointer association and definition" {make bullet item agree with preceding paragraphs}