J3/17-203r1 To: J3 From: John Reid Subject: Coarrays that cannot have cosubscripts Date: 2017 October 16 Discussion: ----------- If a coarray is of a derived type, a subobject that is formed by taking a component is also a coarray but it cannot have cosubscripts. For example, given the declarations Type t Real r End Type Type(t) x[10,*] x%r is a coarray that cannot have cosubscripts. However, it may be passed as an actual argument to a procedure where the corresponding dummy argument is a named coarray that can have cosubscripts. The intrinsic functions COSHAPE (COARRAY [, KIND]), IMAGE_INDEX (COARRAY,...), LCOBOUND(COARRAY), UCOBOUND(COARRAY), and THIS_IMAGE(COARRAY,...) are all defined in terms of the possible cosubscript values that COARRAY may have. They were not intended to be called for a coarray that cannot have cosubscripts. Edits are provided to disallow this. Edits to 17-007r2: ------------------ [373:34] In 16.9.55 COSHAPE (COARRAY [, KIND]), para 3, at end of item COARRAY, add "If its has more than one , the rightmost shall have nonzero corank.". [394:13] In 16.9.97 IMAGE_INDEX (COARRAY, SUB)..., para 3, in item COARRAY, after "any type." add "If its has more than one , the rightmost shall have nonzero corank.". [399:22] In 16.9.110 LCOBOUND (COARRAY [, DIM, KIND]), para 3, at end of item COARRAY, add "If its has more than one , the rightmost shall have nonzero corank.". [435:27] In 16.9.190 THIS_IMAGE([TEAM]),..., para 3, in item COARRAY, after "allocated." add "If its has more than one , the rightmost shall have nonzero corank.". [439:2] In 16.9.197 UCOBOUND (COARRAY [, DIM, KIND]), para 3, at end of item COARRAY, add "If its has more than one , the rightmost shall have nonzero corank.".