To: J3 12-124 From: John Reid Subject: Interp F08/0048: sequence association for coarrays Date: 2012 February 07 Tobias Burnus asked what was happening to this interp in an email (July 18 last year), saying "For what it is worth. I concur with the original 10-226: Namely that the current wording does not allow it - but that it makes sense for consistency to allow it." This is how it would be if we go back to 10-226. I append the text as it appears in 11-006A. This includes arguments from Bill and me for going back to 10-226 and support from Jim Xia. ..................................................................... NUMBER: F08/0048 TITLE: Sequence association for coarrays KEYWORDS: sequence association, coarrays DEFECT TYPE: Erratum STATUS: J3 consideration in progress QUESTION: Was the text in 12.5.2.8: "If the dummy argument is an array coarray that has the CONTIGUOUS attribute or is not of assumed shape, the corresponding actual argument shall be simply contiguous." intended to disallow sequence association for coarrays, as illustrated by the example interface subroutine sub (x) real x(10)[*] end subroutine end interface ... real :: x(100)[*] ... call sub (x(10)) ANSWER: No. This restriction contradicts 12.5.2.4 paragraph 13, which allows the example program. An edit is supplied to correct this. EDIT: In 12.5.2.8 Coarray dummy variables, at the end of paragraph 2 [297:5], add "or an element of a simply contiguous array". SUBMITTED BY: John Reid HISTORY: 10-226 m193 F08/0048 submitted 10-226r1 m193 Revised answer 10-226r2 m193 Passed by J3 meeting 11-129 m194 Failed J3 letter ballot #22 10-254 .................................................................... As in 11-006A: NUMBER: F08/0048 TITLE: Sequence association for coarrays KEYWORDS: sequence association, coarrays DEFECT TYPE: Erratum STATUS: J3 consideration in progress QUESTION: Was the text in 12.5.2.8: "If the dummy argument is an array coarray that has the CONTIGUOUS attribute or is not of assumed shape, the corresponding actual argument shall be simply contiguous." intended to disallow sequence association for coarrays, as illustrated by the example interface subroutine sub (x) real x(10)[*] end subroutine end interface ... real :: x(100)[*] ... call sub (x(10)) 12.5.2.4 paragraph 13 seems to imply that this ought to be valid. ANSWER: Yes, passing an array element to a dummy coarray was not intended to use sequence association. There is no contradiction with 12.5.2.4 paragraph 13 (which as is simply doesn't apply), but it is confusing so an edit is supplied to clarify it. EDIT: [294:33] Append new sentence to 12.5.2.4 paragraph 13, "If the dummy argument is a coarray that is an array, the actual argument shall be an array." SUBMITTED BY: John Reid HISTORY: 10-226 m193 F08/0048 submitted 10-226r1 m193 Revised answer 10-226r2 m193 Passed by J3 meeting 11-129 m194 Failed J3 letter ballot #22 10-254 ** start of negative comments Bill Long's No vote on F08/0048: The proposed restriction on coarrays as actual arguments sequence associated with a contiguous dummy makes yet another exception to ordinary array behavior for coarrays. In this case, there seems to be no justification other than the view that sequence association of arguments is archaic. I think that the confusion introduced by making another case where coarrays are different from ordinary arrays is less desirable that allowing coarrays to behave like "old" arrays. John Reid's NO vote on F08/0048: Sequence association is allowed for array coarrays, so I can see no reason for disallowing it for a scalar coarray that is an element of a simply contiguous array. 12.5.2.4 para 13 says: "If the actual argument is a noncoindexed scalar, the corresponding dummy argument shall be scalar unless the actual argument is default character, of type character with the C character kind (15.2.2), or is an element or substring of an element of an array that is not an assumed-shape, pointer, or polymorphic array." As the standard stands, I believe that this applies. It is made not to apply by the new edit: "If the dummy argument is a coarray that is an array, the actual argument shall be an array." I think this is a technical change that contradicts one of our design principles: wherever possible, coarrays should behave just like variables that are not coarrays. I suggest that we go back to 10-226 which contains the edit In 12.5.2.8 Coarray dummy variables, at the end of paragraph 2 [297:9], add "or an element of a simply contiguous array". Jim Xia's No vote on F08/0048: I believe this restriction might be a bit surprising to users who regularly use sequence associations. Also there isn't an apparent technical difficulties in support this.