Skip gnat.dg/prot7.adb on hppa.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-fortran / dynamic-incr-structural-1.f90
blob6b17b1dbbc920ffc3f4405dcc30707944102d8a7
1 ! { dg-do run }
2 ! { dg-skip-if "" { *-*-* } { "*" } { "-DACC_MEM_SHARED=0" } }
4 program map_multi
5 use openacc
6 implicit none
7 integer, parameter :: n = 512
8 integer, allocatable :: a(:), b(:), c(:)
10 allocate(a(1:n))
11 allocate(b(1:n))
12 allocate(c(1:n))
14 !$acc data copy(a, b, c)
16 ! These arrays have descriptors, so use multiple mappings. Make sure those
17 ! are matched up properly with the mappings in the enclosing data region.
18 !$acc enter data copyin(a)
19 !$acc enter data copyin(b)
20 !$acc enter data copyin(c)
22 !$acc end data
24 if (.not.acc_is_present (a)) stop 1
25 if (.not.acc_is_present (b)) stop 2
26 if (.not.acc_is_present (c)) stop 3
28 !$acc exit data delete(a)
30 if (acc_is_present (a)) stop 4
31 if (.not.acc_is_present (b)) stop 5
32 if (.not.acc_is_present (c)) stop 6
34 !$acc exit data delete(b)
36 if (acc_is_present (a)) stop 7
37 if (acc_is_present (b)) stop 8
38 if (.not.acc_is_present (c)) stop 9
40 !$acc exit data delete(c)
42 if (acc_is_present (a)) stop 10
43 if (acc_is_present (b)) stop 11
44 if (acc_is_present (c)) stop 12
46 deallocate(a)
47 deallocate(b)
48 deallocate(c)
49 end program map_multi