PR23152 - namelist can't contain an assumed size array - a standards question
Paul Thomas
paulthomas2@wanadoo.fr
Wed Aug 10 18:08:00 GMT 2005
Richard,
Thank you for a very direct response. I think that you begin to
understand at the end why I asked the question that way that I did.
> I don't understand how you get "definitely" for assumed size, but are not
> sure about assumed shape. They both sound like non-constant bounds to
I had taken constant bounds to mean that the range over which the array
could be referenced, within the relevant scope, was constant. The
assumed size declaration passes no information at all to the scope about
the bounds of the matrix; just a base address. That is why I wrote
"definitely".
> differently for assumed shape.
Assumed shape arrays, on the other hand, have the bounds fed them by the
compiler. In the case of gfortran, the array descriptor is passed so
that the scope concerned has the required information about the
bounds. I cannot see how it could be done otherwise. This makes no
sense to me. How can something be assumed shape and
> also have constant bounds? Hmm. I've go to look at the code because I
> have no idea how you could say this.... Aha. I see. It has a constant
> lower bound. Now I see at least one source of the confusion.
...and a constant upper bound, given by the array descriptor. If this
were not the case, the size function could not work.
>
> An array has nonconstant bounds if *ANY* of its bounds are other than
> constants. An array has constant bounds only if *ALL* of its bounds
> are constants. In both cases, "assumed" is not a constant.
I have to say that the Cray, Digital and Intel compiler teams agree with
you!
Thanks
Paul T
More information about the Fortran
mailing list