(j3.2006) derived types with type parameters are different
Thu Jul 24 19:34:49 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.
More information about the J3