(j3.2006) Suggestion for Fortran 201x: Adding support for ignoring the TKR of the actual argument

Tobias Burnus burnus
Mon Mar 4 09:33:17 EST 2013

Bill Long wrote:
>>> First, having two "void *buffer" arguments might also occur.
>> This is a solved problem, just use C_PTR and C_LOC.  You don't even need the TS
>> features for this.  Admittedly each call is a little uglier, but it's not that
>> big a deal.
> I think the main problem is that the MPI 3 interfaces are using
> type(*),dimension(*) assuming this matches a void * C function formal
> parameter.

I think TYPE(*), DIMENSION(*) was one initial idea for MPI 3. However, 
the MPI 3 spec seems to use only TYPE(*), DIMENSION(..), unless I missed 
an occurrence of DIMENSION(*). Assumed-rank's DIMENSION(..) will also 
allow for subarrays, which the MPI 3 spec optionally supports.

However, some MPI implementations and also some MPI_F08 sample 
interfaces uses TKR-ignore features via directives for a bunch of compilers.

> While it is a kluge, this could be fixed by modifying the rules such that a scalar actual argument that is not an array element can
> correspond to a  rank-one assumed-size dummy argument in an interface with BIND(C).   The assumed size of the dummy would be 1 in this case.

That would be another possibility, less invasive than something like 
'dimension(**)', though a bit less flexible. (Or follows Nick, who 
suggests that type(c_ptr)/c_loc() on the caller side is sufficient. 
Then, there is more work on the application side but no work on the 
J3/WG5 side.)


More information about the J3 mailing list