J3/15-225 To: J3 Members From: Van Snyder Subject: Clause 8 Date: 2015 September 25 References: 15-188r1, 15-224 1. Edits ======== [17:26 1.3.136.1] Replace "" with "". [169:18 8.1.2.1p1] Replace "Transfer of control" with "Branching (8.2)" because "Transfer of control" prohibits returning from procedures. [169:18-19 8.1.2.1p1] Delete "except ... block" because this is covered by 8.2, and no longer needed after the previous edit. [169:19 8.1.2.1p1] Replace "Transfers" and "transfers" by "Branching" and "branching" respectively. [169:25 8.1.2.2p2] The term "sequence" isn't appropriate. It doesn't follow from 2.3.5 "Execution Sequence" which describes the main program and subprograms, and refers to 8.1.4 for the BLOCK construct, which refers to "excution of its block", i.e., the present subclause. The definition of "sequence" in 1.3.127 uses the term "element" and therefore clearly applies to array elements and storage association. Replace the item with "o the last is executed" [169:27-29 8.1.2.1p2] EXIT and CYCLE statements do not belong to blocks; they belong to constructs. Append "or" at [169:27] and replace the next two bullets with "o an EXIT or CYCLE statement that belongs to the construct containing the block, or to an outer construct, is executed. [170:34 8.1.3.3p1] Insert "(8.1.9)" after "SELECT TYPE". [171:1 8.1.3.3p1] Replace "The" with "If the selector is a coarray, the". [172:1 C807] Delete "of a BLOCK construct". { cannot appear anywhere else.} [172:13+ 8.1.3.1p3+] Insert a paragraph: "If a variable that is a construct entity of the BLOCK construct is o allocatable it is not allocated when execution of the construct begins, and is deallocated when execution of the construct completes, o a pointer its pointer association status is undefined when execution of the construct begins, and o neither allocatable nor a pointer its value is undefined, except for any subobjects that are default initialized, when execution of the construct begins. " {Is this already done somewhere else? Does this need an interp?} [172:13+ 8.1.3.1p3+] Insert another paragraph: "It is permissible to branch to an END BLOCK statement only from within its BLOCK construct." {A general repair to avoid overlooking these kinds of paragraphs was urged in 15-188r1.} [172:27 8.1.6.5p4] After "locality" insert "and is not a construct entity of a BLOCK construct within the DO CONCURRENT construct". {Does this need an interp?} [173:18 8.1.5p3] Replace "this" with "that"; replace "The" with "That". [173:21+ 8.1.5p3+] Insert a paragraph: "It is permissible to branch to an END CRITICAL statement only from within its CRITICAL construct." {A general repair to avoid overlooking these kinds of paragraphs was urged in 15-188r1.} [174:3 8.1.6.1p1] The syntax for a DO construct uses . Replace "sequence of executable constructs" with "block". [175:7-9, 12-14 8.1.6.2 C817,C819] Delete C817 and C819. {C817 and C819 are actually pointless. If somebody declares a variable in the concurrent header it's simply not visible within the construct. It still exists outside the construct.} [175:16 8.1.6.2 C820] After "appears" insert "in an executable statement". After "construct" insert ", other than within a constant expression". [177:12 8.1.6.4.4p1] Delete "from". [177:24 8.1.6.4.4p5] Replace "a transfer of control" with "branching". Replace "execution of" with "executing". [178:6 8.1.6.5 C829] Replace "a nonpure" with "an impure" {that's the term used in Clause 12}. [178:22 8.1.6.5p3] Replace "If ... the variable" with "A variable that has SHARED locality is not a construct entity. Appearances of such a variable". [178:27 8.1.6.5p1-4] Replace the introductory line of 8.1.6.5p4 with: "If a variable is declared within a within a DO CONCURRENT construct, a separate instance of that variable exists in each iteration. Otherwise, if a variable that appears in a DO CONCURRENT construct". {Does this need an interp?} [178:28,31,34,36,38 8.1.6.5p4] Delete "if it" five times. [178:43 8.1.6.5p5] Replace "ordering between" with "relative order of". [180:0+2 NOTE 8.14] Replace "represents" with "illustrates". [181:19-20 8.1.7.4p2] Delete "and execution continues". [189:36 8.5.2p3] After "variable" insert "that is a coarray or coindexed object". Otherwise, noncoarray variables are pretty worthless. [189:42 8.5.2p3] Replace "the effective argument" with "if the effective argument is a coarray or coindexed object, it". [185:17 C858] Delete "given" (it wasn't necessary in C857, so why is it needed here?). [195:20 8.5.8 C859] Replace "ISO_C_BINDING" with "ISO_FORTRAN_ENV". [195:28 8.5.8p2] Replace "defined" with "locked". [195:35 8.5.8p5] Delete "the" before "execution". [197:2 8.5.9p1] Replace "the" with "a" twice. [197:4 8.5.9p2] Replace "the" with "a". [197:22 8.5.9p4] Replace "the" with "a". [197:26 8.5.9p5] Replace "assigned... message" with "assigned an explanatory message, as if by intrinsic assignment" (compare to 9.11.6). [484:12 16.4p1] Before "Two" insert a sentence "A variable that has LOCAL or LOCAL_INIT locality in a DO CONCURRENT construct is a construct entity." 2. Questions and comments without edits ======================================= [170:34 8.1.3.3p1] Can a selector have assumed rank? If so, what is the rank of the associating entity? [172:2 8.1.4p1 C807] Why is NAMELIST prohibited in a BLOCK construct? [174:32 R825] Why did we use an underscore instead of a space in LOCAL_INIT? See also [178:12], [178:17], [178:20]. [175:17 8.1.6.2 C820+] Should there be a constraint that variables mentioned in the LOCAL_INIT exist in the enclosing inclusive scope or are accessible by use or host association unless IMPLICIT NONE is in effect (or always)? If they're not required to exist if IMPLICIT NONE is in effect, at [178:17-19 8.1.6.5p2] insert a sentence "If there is no outside variable one is implicitly declared and the variable inside the construct is initially undefined." {Ugh!} [178:12 8.1.6.5p2] A variable that has LOCAL or LOCAL_INIT locality has the same attributes as "the" variable of the same name outside the construct. What if there are several, say a module variable, a local variable of a subroutine, a local variable of an internal subroutine, a local variable of a block -- especially of a block that DOES NOT enclose the DO CONCURRENT, a local variable of another enclosing DO CONCURRENT construct.... [178:12 8.1.6.5p2] I suspect a LOCAL variable doesn't have the SAVE or VALUE attribute. What about INTENT and PROTECTED? A LOCAL_INIT variable with INTENT(IN) clearly could not be initialized. One with INTENT(OUT) would become undefined (before or after being initialized?) What other attributes does it not have? [178:12-21 8.1.6.5p2] How do LOCAL, LOCAL_INIT and absent optional arguments interact? If a variable is LOCAL and absent, is it still a construct entity? I think so. If a variable is LOCAL_INIT and absent, what happens? Seg fault, probably. [178:22-40 8.1.6.5p3-4] Why is 8.1.6.5p3 different from 8.1.6.5p4? Indeed, why doesn't [173:4] say "If a variable has unspecified or SHARED locality"? [179:1+3-7] NOTE 8.11 could use a DO CONCURRENT construct. [181:13 8.1.7.4] Subclause 8.1 is entitled "Executable constructs containing blocks" but the IF statement does not contain a block. [181:16-17 8.1.7.4 C832] C832 could be done with syntax by separating the prohibited statements from . [183:1-3 8.1.8.2p1(1)] This item is careful to use .EQV. instead of "equal". This careful distinction was urged for TS 18508 but rejected. [186:8+1-3 NOTE 8.24] Is NOTE 8.24 true if a CLASS IS ( T ) or TYPE IS ( T ) statement appears? [190 NOTE 8.30] Is something similar to this expected for DO CONCURRENT? [190 NOTE 8.32] What does "permanent" mean? [191 NOTE 8.34, NOTE 8.36] TS 18508 did not address whether the "image 1" mentioned in these notes is in the initial team.