This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: question about elemental subroutines
Brooks, Richard,
Thanks for the quick answer.
Yes, I have missed the reference to 12.4.1.6, the first three lines of the
paragraph was devoted to MVBITS and I missed the fact that the last line
was concerning the general case. Now I am not sure to fully understand
your answers and what I have been able to read of 12.4.1.6. Am I correct
if I understand them along with note 12.28, that the lines
call nonassign (x(2), x(1))
call nonassign (x(3), x(2))
are correct, but not
call nonassign (x(2:3), x(1:2))
because x(2) is common to the two arguments?
However I am puzzled by the following note:
> NOTE 12.31
> Because a nonpointer dummy argument declared with INTENT(IN) shall not be
> used to change the associated actual argument, the associated actual
> argument remains constant throughout the execution of the procedure.
the 'y' argument of 'nonassign(x,y)' is INTENT(IN), should not x(1:2)
"remains constant throughout the execution of the procedure"? or what am I
missing?
Note that the code I sent is an avatar of the last test in
elemental_subroutine_3.f90 from Paul Thomas. If it is illegal, it should
probably not be part of the test suite.
Dominique