2 ! { dg-skip-if "" { *-*-* } { "*" } { "-DACC_MEM_SHARED=0" } }
6 integer, allocatable
:: h(:)
16 !$acc enter data create (h(1:N))
17 !$acc enter data copyin (h(1:N))
18 !$acc enter data copyin (h(1:N))
19 !$acc enter data copyin (h(1:N))
21 call acc_update_self (h
)
23 if (h(i
) .eq
. i
) c
= c
+ 1
25 ! h[] should be filled with uninitialized device values,
27 if (c
.eq
. N
) call abort
31 !$acc parallel present (h(1:N))
37 ! No actual copyout should happen.
40 if (h(i
) .ne
. 0) call abort
43 !$acc exit data delete (h(1:N))
45 ! This should not actually be deleted yet.
46 if (acc_is_present (h
) .eqv
. .FALSE
.) call abort
48 !$acc exit data copyout (h(1:N)) finalize
51 if (h(i
) .ne
. 111) call abort
54 if (acc_is_present (h
) .eqv
. .TRUE
.) call abort
56 end program refcount_test