(j3.2006) (SC22WG5.3591) Assumed-type and Assumed-rank extensions for C Interop TR.
Bill Long
longb
Mon Jul 28 16:02:11 EDT 2008
Van Snyder wrote:
> On Fri, 2008-07-25 at 14:55 -0500, Bill Long wrote:
>
>> Van Snyder wrote:
>>
>>> RANK() was proposed for Fortran 90 in about 1986. I argued against it,
>>> back when I didn't appreciate the difference between specification and
>>> initialization expressions, and it disappearred. I don't know whether
>>> it was my arguments that made the difference, or others objected as
>>> well, and more eloquently and effectively than I did.
>>>
>>>
>> I imagine that RANK() might have been rejected for f90 because the rank
>> of an object was blatantly obvious from its declaration as an array (or
>> scalar). The assumed-rank concept is new here, and fails to come under
>> that argument. Whether a new intrinsic is needed now seems like a valid
>> discussion point. I left it out on the minimal changes principle,
>> rather than because I thought it was defective.
>>
>
> To interface to HDF, I need a rank-1 array of the same extent as the
> rank of another one. I use size(lbound(X)). I'd like to make this the
> value of a parameter, but at least one processor insists I can't do this
> because X is of assumed shape (the lower bound isn't specified, so it's
> 1). So I make it the dimension of a variable S, then get its value
> using size(S).
>
> As Malcolm says, this might more properly fall into the category of
> "processor has bugs" than "vendors disagree."
>
> Van
>
>
So, you're saying that a code like the following gets an error?
subroutine sub (x)
real :: x(:,:,:)
integer,parameter :: as = size(lbound(x))
real :: b(as)
b = 0
call sub1(b)
end
This seems to me to pass the test of conformance. Did you file a bug
report with your vendor?
Cheers,
Bill
--
Bill Long longb at cray.com
Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9142
Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120
More information about the J3
mailing list