[J3] Vector subscripts and INTENT(INOUT)
Robert Corbett
rpcorbett at att.net
Fri May 11 22:28:03 EDT 2018
> On May 11, 2018, at 1:15 PM, Bill Long via J3 <j3 at mailman.j3-fortran.org> wrote:
>
>>> Is an array section with a vector subscript that has no repeated values definable?
>>
>> Only if the base array is definable (not always the case!). This is perfectly straightforward – a vector-subscripted array variable is itself a variable, and therefore definable unless there is a rule otherwise, which there is not.
>
> So, if I remove the INTENT(INOUT) from the example code [hence no INTENT specified], then the code should be conforming. Although trying that version, which does compile, results in all zero values being printed, as if the subroutine was not executed. I.e. copy-in, but no copy-out. That is the case for multiple compilers.
The code is not conforming, even without the INTENT. The text from paragraph 19 of 15.5.2.4, which you cited in the first message of this thread, says that the variable is not definable. The text that follows the phrase "the dummy argument is not definable" does not make the dummy argument definable.
Robert Corbett
More information about the J3
mailing list