1! { dg-do compile }
2! { dg-additional-options "-fcoarray=single" }
3!
4! PR fortran/63861
5
6module test
7contains
8  subroutine oacc1(a)
9    implicit none
10    integer :: i
11    integer, codimension[*] :: a
12    !$acc declare device_resident (a)
13    !$acc data copy (a)
14    !$acc end data
15    !$acc data deviceptr (a)
16    !$acc end data
17    !$acc parallel private (a)
18    !$acc end parallel
19    !$acc host_data use_device (a)
20    !$acc end host_data
21    !$acc parallel loop reduction(+:a) ! { dg-error "Array 'a' is not permitted in reduction" }
22    do i = 1,5
23    enddo
24    !$acc end parallel loop
25    !$acc parallel loop
26    do i = 1,5
27      !$acc cache (a) ! { dg-error "" "TODO" { xfail *-*-* } }
28    enddo
29    !$acc end parallel loop
30    !$acc update device (a)
31    !$acc update host (a)
32    !$acc update self (a)
33  end subroutine oacc1
34end module test
35