To: J3 J3/21-175r4 From: John Reid Subject: US 12, arrays of coarrays, edits Date: 2021-October-22 Reference: 21-007r2 Discussion ---------- This is a revison of part of J3/21-175r2. 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 ultimate component, and 3. cases where "component" is used when "ultimate 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: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 an ultimate component of a dummy argument, the ultimate argument (15.5.2.4) of the dummy argument shall have the same ultimate component on those images." [To cover the case of a coarray ultimate component of a dummy argument.] [143:32-36] 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." then move the para, as amended in this and the previous edit, to precede para 3 of 9.7.1.1. [So that this para applies to ALLOCATE and DEALLOCATE.] [147:10-11] In 9.7.3.2 Deallocation of allocatable variables, delete para 11. "If an .." [The para moved to 9.7.1.1 applies to DEALLOCATE.] [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 ultimate 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 ultimate 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 deallocating an object with a coarray ultimate component.] [170:5] In 10.2.1.2 Intrinsic assignment statement, para 1, item (1), add "ultimate" 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 ultimate component". [170:9] In 10.2.1.2 Intrinsic assignment statement, para 1, item (3), add "ultimate" 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 ultimate component".