[J3] Question to "The CFI_section function"
Robert Corbett
rpcorbett at att.net
Tue Nov 12 08:18:46 EST 2019
The first part of "Description"
states that successful
execution of CFI_section updates
the "base_addr and dim members
of the C descriptor with the
address result" as described in
the second part of "Description".
Bob Corbett
> On Nov 12, 2019, at 5:03 AM, Tobias Burnus via J3 <j3 at mailman.j3-fortran.org> wrote:
>
>> On 11/12/19 1:38 PM, Robert Corbett wrote:
>> The second part of the "Description" portion of 18.5.5.7 describes what the lower bounds of the result should be. If the C pointer "lower_bounds" is a null pointer, the lower bounds of the result are the lower bounds of the source; otherwise, the lower bounds of the result are the values of the array addressed by the C pointer "lower_bounds".
>
> I don't see those words in the spec – I only see words related to SOURCE and not to RESULT. Quoting lines 26 to 32 of paragraph 3:
>
> "The array section is equivalent to the Fortran array section SOURCE(sectsub_1,sectsub__2, ...sectsub_n), where SOURCE is the array described by source, n is the rank of that array, and sectsub_i is the subscript lower_i if stride_i is zero, and the section subscript lower_i:upper_i:stride_i otherwise. The value of lower_i is the lower bound of dimension i of SOURCE if lower_bounds is a null pointer and lower_bounds[i] otherwise. The value of upper_i is the upper bound of dimension i of SOURCE if upper_bounds is a null pointer and upper_bounds[i] otherwise. The value of stride_i is 1 if strides is a null pointer and strides[i] otherwise. If stride_i has the value zero, lower_i shall have the same value as upper_i."
>
> Tobias
More information about the J3
mailing list