On 29.11.21 22:11, Harald Anlauf wrote:
"A whole array is a named array or a structure component whose final
part-ref is an array component name; no subscript list is appended."
I think in "h(3)" there is not really a named array – thus I read it as
if the "Otherwise ... result value is 1" applies.
If you read on in the standard:
"The appearance of a whole array variable in an executable construct
specifies all the elements of the array ..."
which might make you/makes me think that the sentence before that one
could need an official interpretation...
I am not sure whether I understand what part of the spec you wonder
about. (I mean besides that 'variable' can also mean referencing a
data-pointer-returning function.)
Question: What do NAG/flang/... report for lbound(h(3)) - also [3] – or
[1] as gfortran?
I've submitted a reduced example to the Intel Fortran Forum:
https://community.intel.com/t5/Intel-Fortran-Compiler/Allocate-with-SOURCE-and-bounds/m-p/1339992#M158535
There are good chances that Steve Lionel reads and comments on it.
So far only "FortranFan" has replied – and he comes to the same
conclusion as my reading, albeit without referring to the standard.
Tobias
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634
München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas
Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht
München, HRB 106955