To: J3 11-152 From: Jim Xia Subject: Interop: Constraints on descriptors and usage Date: 2011 February 17 References: N1838,11-126, 11-127, 11-128, 11-134,11-143r1, 11-144r1 DISCUSSION In view of the changes in paper 11-144r1 as amended, several of the underlying assumptions in papers on related topics are changed, and the issues raised there might be automatically resolved. This paper summarizes the resulting status of papers 11-126, 11-127, 11-128, 11-134, and 11-143r1. 11-126: ------- Updating or copying a C descriptor is disallowed by the following edits in 11-144r1: " 5.2.7 Use of C descriptors A C descriptor shall not be initialized, updated or copied other than by calling the functions specified here. ..." 11-127: ------- The "redundant restriction" between 5.2.6p2 and 5.2.7p1 is removed by 144r1 (which replaces 5.2.7 from N1838). Issues raised in 5.2.7 are resolved because 11-144r1 disallows modification of a C descriptor after its initialization except to use functions provided in 5.2.6. 11-128: ------- The proposed edits are included in 11-144r1. 11-134: ------- The issues raised appear to be covered by 11-144r1. 11-143r1: --------- a.) assumed-type array issues are resolved 1.) assumed-shape array is always passed by C descriptor, which contains its actual type and elem_len, etc. So there is no issue to index this array in C program. 2.) explicit-shape array with assumed type is disallowed, and further the assumed-size array is required to be of rank 1 (11-124r3) 3.) pointer and allocatable are disallowed (11-111r2) Summary: For TYPE(*) only assumed-size array (rank 1) can be passed using address. See updated 2.1. b.) alignment issue in "CASTING" example of A1.3 option 1: add comment in A1.3 to say "assume the parameter block is aligned for casting to integer type." option 2: remain silent because the correct alignment is assumed. ---------------