(j3.2006) TKR for C Interop
Aleksandar Donev
donev1
Tue Feb 27 18:27:48 EST 2007
On Tuesday 27 February 2007 15:12, Bill Long wrote:
> Since class(*) is already allowed in interfaces without bind(c) in f03,
> I see option 1 as a non-starter. The CLASS declaration is designed for
> dummy arguments.
Maybe I wasn't clear in what I said, or maybe I am missing something you are
saying. I do not propose changing anything from F2003. In F2003,
interoperable procedures OR interfaces of interoperable procedures cannot
have CLASS(*) dummies (or any polymorphic dummies for that matter).
I am saying that in the TR we should allow class(*) dummies in interfaces of
interoperable procedures, but not for actual Fortran procedures. Why is this
a non-starter? Is there a technical reason or is it because you *think* that
there should be no difference between interface blocks and actual procedure
bodies?
> And it does not address
> the rank part of the problem.
I am aware of that, but that is a more general problem with Fortran that is
not as easy to solve. Writing 15 wrappers or interfaces is still much better
than 100+, I claim, if that is the best we can come up with.
> In terms of dealing with turning off TKR checking in an interface, if
> that's what we want, then we should be up front about it.
OK, let's for now consider this option.
> IGNORE([<ignore-mode-list>])
Let's take an example of a Fortran procedure:
subroutine proc(x)
real(double), ignore(), dimension(:) :: x
x=1.0_double
end subroutine
> I see no reason, on the
> surface, to limit this attribute to interfaces that have bind(c).
But what exactly does this mean:
integer, dimension(10,5) :: y
call proc(y(1:10:2,1:5:3))
???
Does your compiler actually compile this (with the ignore_tkr directive)? Does
it copy the non-contiguous actual into a contiguous buffer to pass to a
one-dimensional dummy? What does x=1.0_double do?
Best,
Aleks
More information about the J3
mailing list