J3/06-240 Date: 31 July 2006 To: J3 From: Bill Long and John Reid Subject: Issue 13 : co-array semantics Reference: J3/06-007 Discussion of Issue 13 (page 89) To address this comment, we propose that new bnf terms be introduced to define and new sections be added at the end of 5.3.7 for the semantics. Some similar text is also needed for ALLOCATE. Edits to J3/06-007 [62:16]. In C444, change '' to ''. [89:4]. In C523, change '' to ''. [89:13-14] Replace R511 by R511 <> <> [92:16+]. At the end of 5.3.7 add new subsections 5.3.7.7 Allocatable co-array An <> is a co-array that has the ALLOCATABLE attribute and a specified co-rank, but its co-bounds are determined by allocation or argument association. R518a <> : C531a (R511) A co-array that has the ALLOCATABLE attribute shall have a that is a . The co-rank of an allocatable co-array is equal to the number of colons in its . The co-bounds of an unallocated allocatable co-array are undefined. No part of such a co-array shall be referenced or defined; however, the co-array may appear as an argument to an intrinsic inquiry function as specified in 13.1. The co-bounds of each co-dimension of an allocatable co-array are those specified when the co-array is allocated. The co-bounds of the allocatable co-array are unaffected by any subsequent redefinition or undefinition of variables on which the bounds' expressions depend. 5.3.7.8 Explicit-co-shape co-array An <> is declared with an . R518b <> [[:],]... [:]* C531b (R511) A co-array that does not have the ALLOCATABLE attribute shall have a that is a . The co-rank is equal to one plus the number of s. R513 <> R514 <> C527 (R512) A or that is not an initialization expression shall appear only in a subprogram or interface body. If an explicit-shape co-array has co-bounds that are not initialization expressions, the co-bounds are determined at entry to the procedure by evaluating the co-bounds expressions. The co-bounds of such a co-array are unaffected by the redefinition or undefinition of any variable during execution of the procedure. The values of each lower-co-bound and upper-co-bound determine the co-bounds of the array along a particular co-dimension. The subscript range of the array in that co-dimension is the set of integer values between and including the lower and upper co-bounds. If the lower-bound is omitted, the default value is 1. The upper co-bound shall not be less than the lower co-bound. [126:11]. After the end of the paragraph before NOTE 6.22, add pararaph: When an ALLOCATE statement is executed for a co-array, the values of the lower co-bound and upper co-bound expressions determine the co-bounds of the co-array. Subsequent redefinition or undefinition of any entities in the co-bound expressions do not affect the co-bounds. If the lower co-bound is omitted, the default value is 1. The upper co-bound shall not be less than the lower co-bound.