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

Malcolm Cohen malcolm
Mon Mar 4 20:43:16 EST 2013

>I think the main problem is that the MPI 3 interfaces are using
>type(*),dimension(*) assuming this matches a void * C function formal
>parameter.  It does for array actual arguments, but fails for the one
>case of a scalar dummy argument.   We "fixed" the scalar dummy argument
>problem for the assumed-rank case / descriptor case, but not for the
>assumed-size/void * case.
>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.

Right, and we did this already for CHARACTER, for precisely the same reason of 
"convenience" when calling C functions.

That (scalar character arg to array character dummy) was certainly not the best 
design in the world, and I have seen some of the programming problems it has 
caused, but since we did it that way for character we might as well do it the 
same way for assumed type.  Perhaps only for assumed-size dummies though.

................................Malcolm Cohen, Nihon NAG, Tokyo. 

More information about the J3 mailing list