Debian Codegraph @

gcc/testsuite/gfortran.dg/gomp/target-has-device-addr-1.f90

raw
1 ! { dg-do compile }
2
3 implicit none
4
5 integer, target :: x
6 integer, pointer :: ptr
7 integer :: a(5)
8
9 !$omp target has_device_addr(x)
10 !$omp end target
11 !$omp target has_device_addr(ptr)
12 !$omp end target
13 !$omp target has_device_addr(a)
14 !$omp end target
15 !$omp target has_device_addr(a(2:3))
16 !$omp end target
17 !$omp target has_device_addr(a(:3))
18 !$omp end target
19 !$omp target has_device_addr(a(2:))
20 !$omp end target
21 !$omp target has_device_addr(a(2))
22 !$omp end target
23
24 !$omp target has_device_addr(x) has_device_addr(x) ! { dg-error "'x' present on multiple clauses" }
25 !$omp end target
26
27 !$omp target private(x) has_device_addr(x) ! { dg-error "'x' present on multiple clauses" }
28 !$omp end target
29 !$omp target has_device_addr(x) private(x) ! { dg-error "'x' present on multiple clauses" }
30 !$omp end target
31 !$omp target firstprivate(x) has_device_addr(x) ! { dg-error "'x' present on multiple clauses" }
32 !$omp end target
33 !$omp target has_device_addr(x) firstprivate(x) ! { dg-error "'x' present on multiple clauses" }
34 !$omp end target
35
36 end