In my earlier reply, I expanded on one of Nick's ideas by proposing the CDESC attribute for the dummy argument declaration, probably with the restriction that it is only allowed in a BIND(C) interface.
Definitely only there :-)
Since we can define the characteristics of the C descriptor, we could, for example, have a field that would identify the corresponding actual argument as assumed-size, and say that if that is set then the value of the last extent is not usable. The compiler for the Fortran caller would be required to generate code to correctly set this flag.
I don't see much of a problem. It would also be useful for scalars.
In some sense, the CDESC attribute is comparable to the VALUE attribute in a BIND(C) interface - it specifies a particular passing semantic that the C function will understand. If this were implemented, 'assumed-rank' would not be needed for the MPI interfaces.
I didn't read your proposal in detail, and think that it is a mistake. It would be a far better idea to have an orthogonal attribute that did nothing else than pass by descriptor. That would be cleanest and most future-proof.
I think that, from the Fortran side, that would be cleaner than allowing assumed-rank to correspond to an assumed-size actual. There are many details to be worked out if we go this direction.
Not really. All one would have to say is that CDESC could be used only in a declaration in an interface, and not one in a procedure definition! It would then be available only for calling into C. Regards, Nick.