The following program seems to be conforming in F2008 and F2018:
module m
contains
subroutine s( a )
integer, intent(inout), allocatable :: a(:)
if (.not. allocated(a) ) error stop
end subroutine s
end module m
program p
use m
integer, allocatable :: i(:)[:,:,:]
call s( i )
end program p
However, is there any way for a procedure to find
out whether the passed variable is a coarray or a non-coarray?
Anton
|