To: J3 J3/12-155 Subject: Definition of "context that requires its shape" From: Van Snyder Date: 2012 June 11 1. Introduction --------------- 5.3.8.5p4 prohibits an assumed-size array to appear in a context that requires its shape. There is no explicit definition of that. Requirements on assumed-size arrays that are based on the requirement to know its shape are scattered throughout. It would be better to put them in one place in the next revision. 2. Edits for next revision -------------------------- [95:36-37 C534] Replace Constraint 534 "C534 An assumed-size array shall not o have the INTENT(OUT) attribute if it is polymorphic, finalizable, of a type with an allocatable ultimate component, or of a type for which default initialization is specified, {old C534} o have the VALUE attribute, {C557} o be a namelist group object, {C585} o appear as a whole array reference in an executable construct or specification expression unless it is an actual argument in a procedure reference that does not require its shape, {6.5.2p2} o appear as an array section reference in which the final subscript triplet does not include a second subscript, {5.3.8.6p5, C627} o be a whole array that is a , {C702} o be a whole array in an assignment statement, {C709} o be an that is a whole array, {C932} {This might not be necessary in light of "appear as a whole array reference ... above} o be a polymorphic actual argument if the referenced procedure does not have explicit interface, {explicitly solves the problem addressed by f08/0067} o be a polymorphic actual argument if the corresponding dummy argument is not polymorphic and is not either a scalar or an explicit-shape array, {explicitly solves the problem addressed by f08/0067} o be a whole array actual argument corresponding to an assumed-shape dummy argument, {12.5.2.4p14} o be the SOURCE argument in a reference to the SHAPE intrinsic function, {6.5.2p2, 7.1.11p2(9)(b)(i)} o be the ARRAY argument in a reference to the SIZE or UBOUND intrinsic function, unless the DIM argument appears, {6.5.2p2, 7.1.11p2(9)(b)(i)} o be the X argument of the C_SIZEOF function from the ISO_C_BINDING intrinsic module. {7.1.11p2(9)(b)(i)} NOTE 5.12a The contexts prohibited by C534 either require the shape of an assumed-size array, or imply its shape might be required in some context. " 3. Possible additional edits ---------------------------- The following are redundant as a result of the replacement of C534, and could be deleted: [96:15 5.3.8.5p4] Delete "An assumed-size array shall not appear in a context that requires its shape." [96:18-19 5.3.8.6p5] Delete "The upper bound shall not be omitted from a subscript triplet in the last dimension." This could be deleted in any case since it duplicates C627. [101:21 C557] Delete "an assumed-size array or". [111:10 C585] Delete C585. [122:4-5 C627] Delete C627. [133:26 C702] Delete C702. [153:5 C713] Delete C713. [217:12 C932] Delete C932. [294:33-34 12.5.2.4p14] Delete "; the actual argument ... substring designator)". The parenthetical requirement can be deleted in any case, since it is implied by "appearance as an array section reference in which the final subscript triplet does not include a second subscript."