To: J3 J3/15-174 Subject: Extension to MOVE_ALLOC From: Van Snyder Reference: 15-007r1 Date: 2015 June 07 1. Introduction =============== For performance reasons, one might wish not to deallocate and then allocate an allocatable variable if it is to have the same bounds. One might equally wish not to do so if it has the same shape, but if it is to have different lower bounds, one must deallocate it and allocate it. 2. Proposal =========== Add an optional LBOUNDS argument to MOVE_ALLOC to specify revised lower bounds for the TO argument. This is analogous to pointer assignment with lower bounds specified. 3. Edits ======== [328 Table 13.1] Revise the entry for MOVE_ALLOC: " MOVE_ALLOC (FROM, TO, [LBOUNDS]) ES Move an allocation " [384:14 13.8.128p0] After "TO" insert "[, LBOUNDS]" [384:22+ 13.8.128p3] Add an argument description: "LBOUNDS (optional) shall be an integer array of any kind, having the same extent as the rank of TO. It shall not be present if TO is a scalar." {Eliminating the final sentence is acceptable. "It shall not appear if TO is a scalar" is an acceptable alternative.} [384:28+ 13.8.18p5+] Add a paragraph: "If LBOUNDS is present it specifies the lower bounds of TO. The shape of TO is not affected."