Fix gcc.c-torture/execute/ieee/cdivchkf.c on hpux
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-fortran / mdc-refcount-1-1-1.f90
blob1d97dd382d49b2a8a2c2f00260739f40a50f3fa0
1 ! { dg-do run }
2 ! { dg-skip-if "" { *-*-* } { "*" } { "-DACC_MEM_SHARED=0" } }
4 ! Adapted from 'libgomp.oacc-fortran/deep-copy-6.f90'.
6 program main
7 use openacc
8 implicit none
9 integer, parameter :: n = 512
10 type mytype
11 integer, allocatable :: a(:)
12 end type mytype
13 type(mytype) :: var
15 allocate(var%a(1:n))
17 !$acc data create(var)
19 !$acc enter data create(var%a)
21 if (.not. acc_is_present(var%a)) stop 1
22 if (.not. acc_is_present(var)) stop 2
24 !$acc exit data delete(var%a) finalize
25 if (acc_is_present(var%a)) stop 3
26 if (.not. acc_is_present(var)) stop 4
28 !$acc end data
29 if (acc_is_present(var%a)) stop 5
30 if (acc_is_present(var)) stop 6
32 deallocate(var%a)
34 end program main