To: J3 J3/21-175r5 From: John Reid Subject: US 12, arrays of coarrays, edits Date: 2021-October-26 Reference: 21-007r2 Discussion ---------- This is a revison of part of J3/21-175r1. Revisions of the rest are in J3/21-199 and J3/21-200. While looking at 21-007r2, I have found 1. an error in a note, 2. places where the text appears not to cover adequately the case of an object with a coarray potential subobject component, and 3. cases where "component" is used when "potential subobject component" is needed. Edits are proposed for these. Edits to 21-007r2 ----------------- [74:5-] In 7.5.4.3 Coarray components, NOTE 1, last sentence, change "an array, an allocatable object, a coarray, or a pointer" to "a coarray or a pointer" so that the sentence becomes "An object of type grid_type cannot be a coarray or a pointer." [Not updated for US 12.] [143:32] In 9.7.1.2 Execution of an ALLOCATE statement, para 4, at the start change "If an specifies" to "If an is" so that the sentence reads "If an is a coarray, its dynamic type and the values of corresponding type parameters shall be the same on every active image in the current team." [Use the correct bnf term.] [143:34-35] In 9.7.1.2 Execution of an ALLOCATE statement, para 4, after the third sentence "If the coarray is a dummy argument ..." add "If the coarray is a potential subobject component of a dummy argument, the ultimate argument (15.5.2.4) of the dummy argument shall have the same potential subobject component on those images." [To cover the case of a coarray potential subobject component of a dummy argument.] [147:10-11] In 9.7.3.2 Deallocation of allocatable variables, change para 11 to "If an is a coarray and is a dummy argument, its ultimate argument (15.5.2.4) shall be the same coarray on those images. If the coarray is a potential subobject component of a dummy argument, the ultimate argument (15.5.2.4) of the dummy argument shall have the same potential subobject component on those images. If the coarray is an ultimate component of an array element, the element shall have the same position in array element order on those images." [Most of the revised para 4 of 9.7.1.2 (for ALLOCATE) is needed here.] [148:7-9] In 9.7.4 STAT= specifier, para 5. In sentence 1 change "If an ALLOCATE or DEALLOCATE statement with a coarray allocate-object" to "If an ALLOCATE statement with an that is a coarray or a DEALLOCATE statement with an that is a coarray or has a coarray potential subobject component" and in sentence 2 change "Otherwise, if an is a coarray," to "Otherwise, if such a statement is executed when" so that the two sentences become "If an ALLOCATE statement with an that is a coarray or a DEALLOCATE statement with an that is a coarray or has a coarray potential subobject component is executed when the current team contains a stopped image, the stat-variable becomes defined with the value STAT_STOPPED_IMAGE from the intrinsic module ISO_FORTRAN_ENV (16.10.2). Otherwise, if such a statement is executed when the current team contains a failed image, and no other error condition occurs, the becomes defined with value STAT_FAILED_IMAGE from the intrinsic module ISO_FORTRAN_ENV." [The present words do not allow for allocating or deallocating an object with a coarray potential subobject component.] [170:5] In 10.2.1.2 Intrinsic assignment statement, para 1, item (1), add "potential subobject" before "component" so that the item becomes "if the variable is polymorphic it shall be allocatable, and not a coarray or a data object with a coarray potential subobject component". ["component" is used when "potential subobject component" is needed.] [170:9] In 10.2.1.2 Intrinsic assignment statement, para 1, item (3), add "potential subobject" before "component" so that the item becomes "the variable and expr shall be conformable unless the variable is an allocatable array that has the same rank as expr and is not a coarray or of a type that has a coarray potential subobject component". ["component" is used when "potential subobject component" is needed.]