(j3.2006) derived types with type parameters are different

Jim Giles JamesGiles-2
Thu Jul 24 20:19:16 EDT 2008

> Bill Long wrote:
>> The words I see require that the corresponding components have the same 
>> attributes. That boils down to whether A(N) and A(N+0) have the same 
>> dimension attribute.  I suspect the answer is yes, whether that's what 
>> we intended or not.
> Why? If it is a constant (initialization expression), like 2+2 and 4, 
> yes, we do clearly expect compilers to evaluate such things. Why and 
> when have we required that equivalence of expressions involving 
> variables (including kind parameters) be detected by compilers? If it 
> were kind-type parameters, then they would be known at compile time and 
> the compiler can calculate all of the dimensions and see it is the same 
> number. Fine. But N and N+0, if N is not a constant, does not seem like 
> something we ought to get into. IMVHO.

KIND type parameters must be initialization expressions.  So all
these expressions you've been arguing about *are* compile-time
constants.  That is to say, the size of the array component of any 
actual declaration of an object of the type is a static value.

J. Giles

More information about the J3 mailing list