2 ! { dg-options "-fcoarray=single -Wall" }
4 ! This program is perfectly valid; however, passing an (allocatable) coarray
5 ! as actual argument to a non-coarray allocatable dummy is doubtful as
6 ! reallocation is not allowed. Thus, an intent(out) dummy should be always
10 integer, allocatable
:: myCaf(:)[:]
14 call doubtful_valid(myCaf
) ! { dg-warning "to allocatable, noncoarray dummy" }
15 call invalid(myCaf
) ! { dg-error "to allocatable, noncoarray, INTENT.OUT. dummy" }
17 subroutine doubtful_valid(x
)
18 integer, allocatable
:: x(:)
19 ! Valid as x's allocation status is not touched.
21 end subroutine doubtful_valid
23 integer, allocatable
, intent(out
) :: y(:)
25 end subroutine invalid