J3/05-266 Date: 05 October 2005 To: J3 From: Aleksandar Donev Subject: C_LOC and contiguous arrays References: J3/05-235r3 Specification: The proposed edits for the CONTIGUOUS attribute (see J3/05-235r3) introduce the concept of a contiguous array but do not complete the integration process. There are a couple of situations where contiguity matters in the standard: 1) (Run time) Contiguity is necessary for certain operations to make sense. Examples are arguments to C_LOC (C does not have strided arrays!) or rank mismatch for array arguments (see 272:19,26). 2) During argument association if the dummy is contiguous and the actual is not copy in/out can take place which makes array temporaries. Examples are pointer association status preservation across calls and ASYNCHRONOUS/VOLATILE attribute (see 271:6 C1232/C1233). CONTIGUOUS affects both of these situations. Some arrays which could previously be noncontiguous and thus had to be excluded from, for example, C_LOC, can now be specified to be contiguous and should no longer be excluded. Additionally there are now new ways to guarantee that copy in/out won't take place. We need to consider all the places in the standard where these two situations are explicitly or implicitly operating, and consider modifying to account for contiguous arrays. I give a proposed edit concerning C_LOC below. I include the ASYNCHRONOUS/VOLATILE edits as well so they are included in discussion. Edits: C_LOC 395: 10 Replace item (b) "an allocated allocatable variable that has the TARGET attribute and is not an array of zero size, or" with new item (b) "A contiguous object that has the TARGET attribute and is not an array of zero size, or" OR (to be decided) (b) "A variable that has the CONTIGUOUS and TARGET attributes and is not an array of zero size, or" ASYNCHRONOUS/VOLATILE: Delete C1232 at 271:6 271:9 C1233 Replace "If an actual argument is a pointer array" with "If an actual argument does not have the CONTIGUOUS attribute"