[J3] CFI descriptors for sequence associated BIND(C) assumed-length dummy arguments
Daniel C Chen
cdchen at ca.ibm.com
Thu Mar 7 18:54:20 UTC 2024
I remember the discussion of 23-116.txt. I think the caller should always prepare the effective argument based on the interface of the dummy argument because the code inside of the callee can only operate based on the declaration of the dummy argument. In this case, as far as c_defined_procedure is concerned, the incoming argument is a rank-1 array.
Daniel
________________________________
From: J3 <j3-bounces at mailman.j3-fortran.org> on behalf of Steve Lionel via J3 <j3 at mailman.j3-fortran.org>
Sent: March 7, 2024 1:45 PM
To: j3 at mailman.j3-fortran.org <j3 at mailman.j3-fortran.org>
Cc: Steve Lionel <steve at stevelionel.com>
Subject: [EXTERNAL] Re: [J3] CFI descriptors for sequence associated BIND(C) assumed-length dummy arguments
On 3/7/2024 4: 25 AM, Jean Perier via J3 wrote: Should the cfi descriptors prepared when calling “c_defined_procedure” both be descriptors for an entity of rank and shape 100 (dummy argument shape), or should it be a descriptor for a rank-2
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
<https://us-phishalarm-ewt.proofpoint.com/EWT/v1/PjiDSg!2S-hwpQVytmakKYbuGHlzbjhMZonhkGwAt0V7GiTjTV3abwFGwgHpY03aF3OsbGLEMUZ0SttIwM2qMecA8svoBEnSwy0zmu2UrHXBio$>
Report Suspicious
ZjQcmQRYFpfptBannerEnd
On 3/7/2024 4:25 AM, Jean Perier via J3 wrote:
Should the cfi descriptors prepared when calling “c_defined_procedure” both be descriptors for an entity of rank and shape 100 (dummy argument shape), or should it be a descriptor for a rank-2 entity with shape (10, 20) in the first call, and a descriptor for a scalar in the second call (actual argument shape)?
I think this is related to the topic of Interp F23/002, which was discussed at length last year but withdrawn for rework, as we could not come to agreement. See j3-fortran.org/doc/year/23/23-116.txt<https://j3-fortran.org/doc/year/23/23-116.txt> I can see validity in both sides of the issue, which makes it difficult. Unfortunately, Malcolm wasn't able to attend the J3 meeting we held last week so no further progress was made.
Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20240307/8f328659/attachment.htm>
More information about the J3
mailing list