(j3.2006) kind conversion for intent(in), value dummy arguments

Lionel, Steve steve.lionel
Tue Sep 16 14:28:58 EDT 2008


> > In C's calling-by-value convention, there is an implicit conversion
> on
> > the caller site to match the explicit interface.  So even the user
> > uses a different kind value (say int vs long long int), the compiler
> > makes sure on the caller site, the conversion happens.  This is a
> > quite useful feature in C that lacks in Fortran's VALUE attribute.
> We
> > may consider to add this to Fortran C-interop TR.
> 
> If we do this at all, it should be a general feature of the VALUE
> attribute, not some wart stuck on C interop.  It ought to be defined
in
> terms of assignment, probably including defined assignment.

Intel Fortran, as an extension, does implicit KIND conversions for
constant actual arguments in the presence of an explicit, non-generic
interface. It does not do type conversions (integer to real, etc.). I
don't think we considered doing this for any kind of VALUE argument, but
I agree it seems worthwhile.  I agree with Van that it should be a
general property of VALUE.  I would NOT like to see this in terms of
assignment, defined or intrinsic, but rather in terms of implicit type
conversion as is defined for expressions.  (Again, I think this should
be for kind differences only.)

I'm less comfortable with how this would play with generic resolution.

Steve Lionel
Developer Products Division
Intel Corporation
Nashua, NH 






More information about the J3 mailing list