2 ! { dg-additional-options "-cpp" }
4 function is_mapped (n
) result (rc
)
7 integer, intent (in
) :: n
16 rc
= acc_is_present (n
, sizeof (n
))
19 end function is_mapped
28 !$acc data copyin (i, j)
29 if (is_mapped (i
) .eqv
. .FALSE
.) call abort
30 if (is_mapped (j
) .eqv
. .FALSE
.) call abort
32 if (i
.ne
. -1 .or
. j
.ne
. -2) call abort
37 if (i
.ne
. 2 .or
. j
.ne
. 1) call abort
40 if (i
.ne
. 2 .or
. j
.ne
. 1) call abort
45 !$acc data copyout (i, j)
46 if (is_mapped (i
) .eqv
. .FALSE
.) call abort
47 if (is_mapped (j
) .eqv
. .FALSE
.) call abort
49 if (i
.ne
. -1 .or
. j
.ne
. -2) call abort
54 if (i
.ne
. 2 .or
. j
.ne
. 1) call abort
56 !$acc parallel present (i, j)
62 if (i
.ne
. 4 .or
. j
.ne
. 2) call abort
67 !$acc data create (i, j)
68 if (is_mapped (i
) .eqv
. .FALSE
.) call abort
69 if (is_mapped (j
) .eqv
. .FALSE
.) call abort
71 if (i
.ne
. -1 .or
. j
.ne
. -2) call abort
76 if (i
.ne
. 2 .or
. j
.ne
. 1) call abort
79 if (i
.ne
. 2 .or
. j
.ne
. 1) call abort
84 !$acc data present_or_copyin (i, j)
85 if (is_mapped (i
) .eqv
. .FALSE
.) call abort
86 if (is_mapped (j
) .eqv
. .FALSE
.) call abort
88 if (i
.ne
. -1 .or
. j
.ne
. -2) call abort
93 if (i
.ne
. 2 .or
. j
.ne
. 1) call abort
96 if (i
.ne
. 2 .or
. j
.ne
. 1) call abort
101 !$acc data present_or_copyout (i, j)
102 if (is_mapped (i
) .eqv
. .FALSE
.) call abort
103 if (is_mapped (j
) .eqv
. .FALSE
.) call abort
105 if (i
.ne
. -1 .or
. j
.ne
. -2) call abort
110 if (i
.ne
. 2 .or
. j
.ne
. 1) call abort
112 !$acc parallel present (i, j)
118 if (i
.ne
. 4 .or
. j
.ne
. 2) call abort
123 !$acc data present_or_copy (i, j)
124 if (is_mapped (i
) .eqv
. .FALSE
.) call abort
125 if (is_mapped (j
) .eqv
. .FALSE
.) call abort
127 if (i
.ne
. -1 .or
. j
.ne
. -2) call abort
132 if (i
.ne
. 2 .or
. j
.ne
. 1) call abort
136 if (i
.ne
. 2 .or
. j
.ne
. 1) call abort
138 if (i
.ne
. -1 .or
. j
.ne
. -2) call abort
144 !$acc data present_or_create (i, j)
145 if (is_mapped (i
) .eqv
. .FALSE
.) call abort
146 if (is_mapped (j
) .eqv
. .FALSE
.) call abort
151 if (i
.ne
. 2 .or
. j
.ne
. 1) call abort
154 if (i
.ne
. 2 .or
. j
.ne
. 1) call abort
159 !$acc data copyin (i, j)
160 !$acc data present (i, j)
161 if (is_mapped (i
) .eqv
. .FALSE
.) call abort
162 if (is_mapped (j
) .eqv
. .FALSE
.) call abort
164 if (i
.ne
. -1 .or
. j
.ne
. -2) call abort
169 if (i
.ne
. 2 .or
. j
.ne
. 1) call abort
173 if (i
.ne
. 2 .or
. j
.ne
. 1) call abort
178 !$acc data copyin (i, j)
179 !$acc data present (i, j)
180 if (is_mapped (i
) .eqv
. .FALSE
.) call abort
181 if (is_mapped (j
) .eqv
. .FALSE
.) call abort
183 if (i
.ne
. -1 .or
. j
.ne
. -2) call abort
188 if (i
.ne
. 2 .or
. j
.ne
. 1) call abort
192 if (i
.ne
. 2 .or
. j
.ne
. 1) call abort
199 if (is_mapped (i
) .eqv
. .TRUE
.) call abort
200 if (is_mapped (j
) .eqv
. .TRUE
.) call abort
202 if (i
.ne
. -1 .or
. j
.ne
. -2) call abort
207 if (i
.ne
. 2 .or
. j
.ne
. 1) call abort
210 if (i
.ne
. 2 .or
. j
.ne
. 1) call abort