| 1 |
! OpenACC 'self' clause. |
| 2 |
|
| 3 |
! This is 'if-1.f90' with 'self(!cond)' instead of 'if(cond)' on compute |
| 4 |
! constructs. |
| 5 |
|
| 6 |
! { dg-do run } |
| 7 |
! { dg-additional-options "-cpp" } |
| 8 |
|
| 9 |
! { dg-additional-options "--param=openacc-kernels=decompose" } |
| 10 |
|
| 11 |
! { dg-additional-options "-fopt-info-note-omp" } |
| 12 |
! { dg-additional-options "-foffload=-fopt-info-note-omp" } |
| 13 |
|
| 14 |
! { dg-additional-options "--param=openacc-privatization=noisy" } |
| 15 |
! { dg-additional-options "-foffload=--param=openacc-privatization=noisy" } |
| 16 |
! Prune a few: uninteresting, and potentially varying depending on GCC configuration (data types): |
| 17 |
! { dg-prune-output {note: variable 'D\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} } |
| 18 |
|
| 19 |
! It's only with Tcl 8.5 (released in 2007) that "the variable 'varName' |
| 20 |
! passed to 'incr' may be unset, and in that case, it will be set to [...]", |
| 21 |
! so to maintain compatibility with earlier Tcl releases, we manually |
| 22 |
! initialize counter variables: |
| 23 |
! { dg-line l_dummy[variable c_compute 0] } |
| 24 |
! { dg-message "dummy" "" { target iN-VAl-Id } l_dummy } to avoid |
| 25 |
! "WARNING: dg-line var l_dummy defined, but not used". */ |
| 26 |
|
| 27 |
program main |
| 28 |
use openacc |
| 29 |
implicit none |
| 30 |
|
| 31 |
integer, parameter :: N = 8 |
| 32 |
integer, parameter :: one = 1 |
| 33 |
integer, parameter :: zero = 0 |
| 34 |
integer i, nn |
| 35 |
real, allocatable :: a(:), b(:) |
| 36 |
real exp, exp2 |
| 37 |
|
| 38 |
i = 0 |
| 39 |
|
| 40 |
allocate (a(N)) |
| 41 |
allocate (b(N)) |
| 42 |
|
| 43 |
a(:) = 4.0 |
| 44 |
|
| 45 |
!$acc parallel copyin (a(1:N)) copyout (b(1:N)) self (1 /= 1) ! { dg-line l_compute[incr c_compute] } |
| 46 |
do i = 1, N |
| 47 |
! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_compute$c_compute } |
| 48 |
!TODO Unhandled 'CONST_DECL' instances for constant argument in 'acc_on_device' call. |
| 49 |
if (acc_on_device (acc_device_host) .eqv. .TRUE.) then |
| 50 |
b(i) = a(i) + 1 |
| 51 |
else |
| 52 |
b(i) = a(i) |
| 53 |
end if |
| 54 |
end do |
| 55 |
!$acc end parallel |
| 56 |
|
| 57 |
#if ACC_MEM_SHARED |
| 58 |
exp = 5.0 |
| 59 |
#else |
| 60 |
exp = 4.0 |
| 61 |
#endif |
| 62 |
|
| 63 |
do i = 1, N |
| 64 |
if (b(i) .ne. exp) STOP 1 |
| 65 |
end do |
| 66 |
|
| 67 |
a(:) = 16.0 |
| 68 |
|
| 69 |
!$acc parallel self (0 /= 1) ! { dg-line l_compute[incr c_compute] } |
| 70 |
do i = 1, N |
| 71 |
! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_compute$c_compute } |
| 72 |
if (acc_on_device (acc_device_host) .eqv. .TRUE.) then |
| 73 |
b(i) = a(i) + 1 |
| 74 |
else |
| 75 |
b(i) = a(i) |
| 76 |
end if |
| 77 |
end do |
| 78 |
!$acc end parallel |
| 79 |
|
| 80 |
do i = 1, N |
| 81 |
if (b(i) .ne. 17.0) STOP 2 |
| 82 |
end do |
| 83 |
|
| 84 |
a(:) = 8.0 |
| 85 |
|
| 86 |
!$acc parallel copyin (a(1:N)) copyout (b(1:N)) self (one /= 1) ! { dg-line l_compute[incr c_compute] } |
| 87 |
do i = 1, N |
| 88 |
! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_compute$c_compute } |
| 89 |
if (acc_on_device (acc_device_host) .eqv. .TRUE.) then |
| 90 |
b(i) = a(i) + 1 |
| 91 |
else |
| 92 |
b(i) = a(i) |
| 93 |
end if |
| 94 |
end do |
| 95 |
!$acc end parallel |
| 96 |
|
| 97 |
#if ACC_MEM_SHARED |
| 98 |
exp = 9.0 |
| 99 |
#else |
| 100 |
exp = 8.0 |
| 101 |
#endif |
| 102 |
|
| 103 |
do i = 1, N |
| 104 |
if (b(i) .ne. exp) STOP 3 |
| 105 |
end do |
| 106 |
|
| 107 |
a(:) = 22.0 |
| 108 |
|
| 109 |
!$acc parallel self (zero /= 1) ! { dg-line l_compute[incr c_compute] } |
| 110 |
do i = 1, N |
| 111 |
! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_compute$c_compute } |
| 112 |
if (acc_on_device (acc_device_host) .eqv. .TRUE.) then |
| 113 |
b(i) = a(i) + 1 |
| 114 |
else |
| 115 |
b(i) = a(i) |
| 116 |
end if |
| 117 |
end do |
| 118 |
!$acc end parallel |
| 119 |
|
| 120 |
do i = 1, N |
| 121 |
if (b(i) .ne. 23.0) STOP 4 |
| 122 |
end do |
| 123 |
|
| 124 |
a(:) = 16.0 |
| 125 |
|
| 126 |
!$acc parallel copyin (a(1:N)) copyout (b(1:N)) self (.FALSE.) ! { dg-line l_compute[incr c_compute] } |
| 127 |
do i = 1, N |
| 128 |
! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_compute$c_compute } |
| 129 |
if (acc_on_device (acc_device_host) .eqv. .TRUE.) then |
| 130 |
b(i) = a(i) + 1 |
| 131 |
else |
| 132 |
b(i) = a(i) |
| 133 |
end if |
| 134 |
end do |
| 135 |
!$acc end parallel |
| 136 |
|
| 137 |
#if ACC_MEM_SHARED |
| 138 |
exp = 17.0; |
| 139 |
#else |
| 140 |
exp = 16.0; |
| 141 |
#endif |
| 142 |
|
| 143 |
do i = 1, N |
| 144 |
if (b(i) .ne. exp) STOP 5 |
| 145 |
end do |
| 146 |
|
| 147 |
a(:) = 76.0 |
| 148 |
|
| 149 |
!$acc parallel self (.TRUE.) ! { dg-line l_compute[incr c_compute] } |
| 150 |
do i = 1, N |
| 151 |
! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_compute$c_compute } |
| 152 |
if (acc_on_device (acc_device_host) .eqv. .TRUE.) then |
| 153 |
b(i) = a(i) + 1 |
| 154 |
else |
| 155 |
b(i) = a(i) |
| 156 |
end if |
| 157 |
end do |
| 158 |
!$acc end parallel |
| 159 |
|
| 160 |
do i = 1, N |
| 161 |
if (b(i) .ne. 77.0) STOP 6 |
| 162 |
end do |
| 163 |
|
| 164 |
a(:) = 22.0 |
| 165 |
|
| 166 |
nn = 1 |
| 167 |
|
| 168 |
!$acc parallel copyin (a(1:N)) copyout (b(1:N)) self (nn /= 1) ! { dg-line l_compute[incr c_compute] } |
| 169 |
do i = 1, N |
| 170 |
! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_compute$c_compute } |
| 171 |
if (acc_on_device (acc_device_host) .eqv. .TRUE.) then |
| 172 |
b(i) = a(i) + 1 |
| 173 |
else |
| 174 |
b(i) = a(i) |
| 175 |
end if |
| 176 |
end do |
| 177 |
!$acc end parallel |
| 178 |
|
| 179 |
#if ACC_MEM_SHARED |
| 180 |
exp = 23.0; |
| 181 |
#else |
| 182 |
exp = 22.0; |
| 183 |
#endif |
| 184 |
|
| 185 |
do i = 1, N |
| 186 |
if (b(i) .ne. exp) STOP 7 |
| 187 |
end do |
| 188 |
|
| 189 |
a(:) = 18.0 |
| 190 |
|
| 191 |
nn = 0 |
| 192 |
|
| 193 |
!$acc parallel self (nn /= 1) ! { dg-line l_compute[incr c_compute] } |
| 194 |
do i = 1, N |
| 195 |
! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_compute$c_compute } |
| 196 |
if (acc_on_device (acc_device_host) .eqv. .TRUE.) then |
| 197 |
b(i) = a(i) + 1 |
| 198 |
else |
| 199 |
b(i) = a(i) |
| 200 |
end if |
| 201 |
end do |
| 202 |
!$acc end parallel |
| 203 |
|
| 204 |
do i = 1, N |
| 205 |
if (b(i) .ne. 19.0) STOP 8 |
| 206 |
end do |
| 207 |
|
| 208 |
a(:) = 49.0 |
| 209 |
|
| 210 |
nn = 1 |
| 211 |
|
| 212 |
!$acc parallel copyin (a(1:N)) copyout (b(1:N)) self (.NOT. ((nn + nn) > 0)) ! { dg-line l_compute[incr c_compute] } |
| 213 |
do i = 1, N |
| 214 |
! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_compute$c_compute } |
| 215 |
if (acc_on_device (acc_device_host) .eqv. .TRUE.) then |
| 216 |
b(i) = a(i) + 1 |
| 217 |
else |
| 218 |
b(i) = a(i) |
| 219 |
end if |
| 220 |
end do |
| 221 |
!$acc end parallel |
| 222 |
|
| 223 |
#if ACC_MEM_SHARED |
| 224 |
exp = 50.0 |
| 225 |
#else |
| 226 |
exp = 49.0 |
| 227 |
#endif |
| 228 |
|
| 229 |
do i = 1, N |
| 230 |
if (b(i) .ne. exp) STOP 9 |
| 231 |
end do |
| 232 |
|
| 233 |
a(:) = 38.0 |
| 234 |
|
| 235 |
nn = 0; |
| 236 |
|
| 237 |
!$acc parallel copyin (a(1:N)) copyout (b(1:N)) self (.NOT. ((nn + nn) > 0)) ! { dg-line l_compute[incr c_compute] } |
| 238 |
do i = 1, N |
| 239 |
! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_compute$c_compute } |
| 240 |
if (acc_on_device (acc_device_host) .eqv. .TRUE.) then |
| 241 |
b(i) = a(i) + 1 |
| 242 |
else |
| 243 |
b(i) = a(i) |
| 244 |
end if |
| 245 |
end do |
| 246 |
!$acc end parallel |
| 247 |
|
| 248 |
do i = 1, N |
| 249 |
if (b(i) .ne. 39.0) STOP 10 |
| 250 |
end do |
| 251 |
|
| 252 |
a(:) = 91.0 |
| 253 |
|
| 254 |
!$acc parallel copyin (a(1:N)) copyout (b(1:N)) self (.NOT. (-2 > 0)) ! { dg-line l_compute[incr c_compute] } |
| 255 |
do i = 1, N |
| 256 |
! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_compute$c_compute } |
| 257 |
if (acc_on_device (acc_device_host) .eqv. .TRUE.) then |
| 258 |
b(i) = a(i) + 1 |
| 259 |
else |
| 260 |
b(i) = a(i) |
| 261 |
end if |
| 262 |
end do |
| 263 |
!$acc end parallel |
| 264 |
|
| 265 |
do i = 1, N |
| 266 |
if (b(i) .ne. 92.0) STOP 11 |
| 267 |
end do |
| 268 |
|
| 269 |
a(:) = 43.0 |
| 270 |
|
| 271 |
!$acc parallel copyin (a(1:N)) copyout (b(1:N)) self (one /= 1) ! { dg-line l_compute[incr c_compute] } |
| 272 |
do i = 1, N |
| 273 |
! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_compute$c_compute } |
| 274 |
if (acc_on_device (acc_device_host) .eqv. .TRUE.) then |
| 275 |
b(i) = a(i) + 1 |
| 276 |
else |
| 277 |
b(i) = a(i) |
| 278 |
end if |
| 279 |
end do |
| 280 |
!$acc end parallel |
| 281 |
|
| 282 |
#if ACC_MEM_SHARED |
| 283 |
exp = 44.0 |
| 284 |
#else |
| 285 |
exp = 43.0 |
| 286 |
#endif |
| 287 |
|
| 288 |
do i = 1, N |
| 289 |
if (b(i) .ne. exp) STOP 12 |
| 290 |
end do |
| 291 |
|
| 292 |
a(:) = 87.0 |
| 293 |
|
| 294 |
!$acc parallel self (one /= 0) ! { dg-line l_compute[incr c_compute] } |
| 295 |
do i = 1, N |
| 296 |
! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_compute$c_compute } |
| 297 |
if (acc_on_device (acc_device_host) .eqv. .TRUE.) then |
| 298 |
b(i) = a(i) + 1 |
| 299 |
else |
| 300 |
b(i) = a(i) |
| 301 |
end if |
| 302 |
end do |
| 303 |
!$acc end parallel |
| 304 |
|
| 305 |
do i = 1, N |
| 306 |
if (b(i) .ne. 88.0) STOP 13 |
| 307 |
end do |
| 308 |
|
| 309 |
a(:) = 3.0 |
| 310 |
b(:) = 9.0 |
| 311 |
|
| 312 |
#if ACC_MEM_SHARED |
| 313 |
exp = 0.0 |
| 314 |
exp2 = 0.0 |
| 315 |
#else |
| 316 |
call acc_copyin (a, sizeof (a)) |
| 317 |
call acc_copyin (b, sizeof (b)) |
| 318 |
exp = 3.0; |
| 319 |
exp2 = 9.0; |
| 320 |
#endif |
| 321 |
|
| 322 |
!$acc update device (a(1:N), b(1:N)) if (1 == 1) |
| 323 |
|
| 324 |
a(:) = 0.0 |
| 325 |
b(:) = 0.0 |
| 326 |
|
| 327 |
!$acc update host (a(1:N), b(1:N)) if (1 == 1) |
| 328 |
|
| 329 |
do i = 1, N |
| 330 |
if (a(i) .ne. exp) STOP 14 |
| 331 |
if (b(i) .ne. exp2) STOP 15 |
| 332 |
end do |
| 333 |
|
| 334 |
a(:) = 6.0 |
| 335 |
b(:) = 12.0 |
| 336 |
|
| 337 |
!$acc update device (a(1:N), b(1:N)) if (0 == 1) |
| 338 |
|
| 339 |
a(:) = 0.0 |
| 340 |
b(:) = 0.0 |
| 341 |
|
| 342 |
!$acc update host (a(1:N), b(1:N)) if (1 == 1) |
| 343 |
|
| 344 |
do i = 1, N |
| 345 |
if (a(i) .ne. exp) STOP 16 |
| 346 |
if (b(i) .ne. exp2) STOP 17 |
| 347 |
end do |
| 348 |
|
| 349 |
a(:) = 26.0 |
| 350 |
b(:) = 21.0 |
| 351 |
|
| 352 |
!$acc update device (a(1:N), b(1:N)) if (1 == 1) |
| 353 |
|
| 354 |
a(:) = 0.0 |
| 355 |
b(:) = 0.0 |
| 356 |
|
| 357 |
!$acc update host (a(1:N), b(1:N)) if (0 == 1) |
| 358 |
|
| 359 |
do i = 1, N |
| 360 |
if (a(i) .ne. 0.0) STOP 18 |
| 361 |
if (b(i) .ne. 0.0) STOP 19 |
| 362 |
end do |
| 363 |
|
| 364 |
#if !ACC_MEM_SHARED |
| 365 |
call acc_copyout (a, sizeof (a)) |
| 366 |
call acc_copyout (b, sizeof (b)) |
| 367 |
#endif |
| 368 |
|
| 369 |
a(:) = 4.0 |
| 370 |
b(:) = 0.0 |
| 371 |
|
| 372 |
!$acc data copyin (a(1:N)) copyout (b(1:N)) if (1 == 1) |
| 373 |
! { dg-note {variable 'parm\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } |
| 374 |
|
| 375 |
!$acc parallel present (a(1:N)) |
| 376 |
do i = 1, N |
| 377 |
b(i) = a(i) |
| 378 |
end do |
| 379 |
!$acc end parallel |
| 380 |
!$acc end data |
| 381 |
|
| 382 |
do i = 1, N |
| 383 |
if (b(i) .ne. 4.0) STOP 20 |
| 384 |
end do |
| 385 |
|
| 386 |
a(:) = 8.0 |
| 387 |
b(:) = 1.0 |
| 388 |
|
| 389 |
!$acc data copyin (a(1:N)) copyout (b(1:N)) if (0 == 1) |
| 390 |
! { dg-note {variable 'parm\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: artificial} "" { target { ! openacc_host_selected } } .-1 } |
| 391 |
|
| 392 |
#if !ACC_MEM_SHARED |
| 393 |
if (acc_is_present (a) .eqv. .TRUE.) STOP 21 |
| 394 |
if (acc_is_present (b) .eqv. .TRUE.) STOP 22 |
| 395 |
#endif |
| 396 |
|
| 397 |
!$acc end data |
| 398 |
|
| 399 |
a(:) = 18.0 |
| 400 |
b(:) = 21.0 |
| 401 |
|
| 402 |
!$acc data copyin (a(1:N)) if (1 == 1) |
| 403 |
! { dg-note {variable 'parm\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } |
| 404 |
! { dg-note {variable 'parm\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: artificial} "" { target { ! openacc_host_selected } } .-2 } |
| 405 |
|
| 406 |
#if !ACC_MEM_SHARED |
| 407 |
if (acc_is_present (a) .eqv. .FALSE.) STOP 23 |
| 408 |
#endif |
| 409 |
|
| 410 |
!$acc data copyout (b(1:N)) if (0 == 1) |
| 411 |
! { dg-note {variable 'parm\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } |
| 412 |
! { dg-note {variable 'parm\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: artificial} "" { target { ! openacc_host_selected } } .-2 } |
| 413 |
#if !ACC_MEM_SHARED |
| 414 |
if (acc_is_present (b) .eqv. .TRUE.) STOP 24 |
| 415 |
#endif |
| 416 |
!$acc data copyout (b(1:N)) if (1 == 1) |
| 417 |
! { dg-note {variable 'parm\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } |
| 418 |
|
| 419 |
!$acc parallel present (a(1:N)) present (b(1:N)) |
| 420 |
do i = 1, N |
| 421 |
b(i) = a(i) |
| 422 |
end do |
| 423 |
!$acc end parallel |
| 424 |
|
| 425 |
!$acc end data |
| 426 |
|
| 427 |
#if !ACC_MEM_SHARED |
| 428 |
if (acc_is_present (b) .eqv. .TRUE.) STOP 25 |
| 429 |
#endif |
| 430 |
!$acc end data |
| 431 |
!$acc end data |
| 432 |
|
| 433 |
do i = 1, N |
| 434 |
if (b(1) .ne. 18.0) STOP 26 |
| 435 |
end do |
| 436 |
|
| 437 |
!$acc enter data copyin (b(1:N)) if (0 == 1) |
| 438 |
|
| 439 |
#if !ACC_MEM_SHARED |
| 440 |
if (acc_is_present (b) .eqv. .TRUE.) STOP 27 |
| 441 |
#endif |
| 442 |
|
| 443 |
!$acc exit data delete (b(1:N)) if (0 == 1) |
| 444 |
|
| 445 |
!$acc enter data copyin (b(1:N)) if (1 == 1) |
| 446 |
|
| 447 |
#if !ACC_MEM_SHARED |
| 448 |
if (acc_is_present (b) .eqv. .FALSE.) STOP 28 |
| 449 |
#endif |
| 450 |
|
| 451 |
!$acc exit data delete (b(1:N)) if (1 == 1) |
| 452 |
|
| 453 |
#if !ACC_MEM_SHARED |
| 454 |
if (acc_is_present (b) .eqv. .TRUE.) STOP 29 |
| 455 |
#endif |
| 456 |
|
| 457 |
!$acc enter data copyin (b(1:N)) if (zero == 1) |
| 458 |
|
| 459 |
#if !ACC_MEM_SHARED |
| 460 |
if (acc_is_present (b) .eqv. .TRUE.) STOP 30 |
| 461 |
#endif |
| 462 |
|
| 463 |
!$acc exit data delete (b(1:N)) if (zero == 1) |
| 464 |
|
| 465 |
!$acc enter data copyin (b(1:N)) if (one == 1) |
| 466 |
|
| 467 |
#if !ACC_MEM_SHARED |
| 468 |
if (acc_is_present (b) .eqv. .FALSE.) STOP 31 |
| 469 |
#endif |
| 470 |
|
| 471 |
!$acc exit data delete (b(1:N)) if (one == 1) |
| 472 |
|
| 473 |
#if !ACC_MEM_SHARED |
| 474 |
if (acc_is_present (b) .eqv. .TRUE.) STOP 32 |
| 475 |
#endif |
| 476 |
|
| 477 |
!$acc enter data copyin (b(1:N)) if (one == 0) |
| 478 |
|
| 479 |
#if !ACC_MEM_SHARED |
| 480 |
if (acc_is_present (b) .eqv. .TRUE.) STOP 33 |
| 481 |
#endif |
| 482 |
|
| 483 |
!$acc exit data delete (b(1:N)) if (one == 0) |
| 484 |
|
| 485 |
!$acc enter data copyin (b(1:N)) if (one == 1) |
| 486 |
|
| 487 |
#if !ACC_MEM_SHARED |
| 488 |
if (acc_is_present (b) .eqv. .FALSE.) STOP 34 |
| 489 |
#endif |
| 490 |
|
| 491 |
!$acc exit data delete (b(1:N)) if (one == 1) |
| 492 |
|
| 493 |
#if !ACC_MEM_SHARED |
| 494 |
if (acc_is_present (b) .eqv. .TRUE.) STOP 35 |
| 495 |
#endif |
| 496 |
|
| 497 |
a(:) = 4.0 |
| 498 |
|
| 499 |
!$acc kernels copyin (a(1:N)) copyout (b(1:N)) self (1 /= 1) ! { dg-line l_compute[incr c_compute] } |
| 500 |
! { dg-note {OpenACC 'kernels' decomposition: variable 'i' in 'copy' clause requested to be made addressable} {} { target *-*-* } l_compute$c_compute } |
| 501 |
! { dg-note {variable 'i' made addressable} {} { target *-*-* } l_compute$c_compute } */ |
| 502 |
! { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} "" { target *-*-* } .+1 } |
| 503 |
do i = 1, N |
| 504 |
! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_compute$c_compute } |
| 505 |
if (acc_on_device (acc_device_host) .eqv. .TRUE.) then |
| 506 |
b(i) = a(i) + 1 |
| 507 |
else |
| 508 |
b(i) = a(i) |
| 509 |
end if |
| 510 |
end do |
| 511 |
!$acc end kernels |
| 512 |
|
| 513 |
#if ACC_MEM_SHARED |
| 514 |
exp = 5.0 |
| 515 |
#else |
| 516 |
exp = 4.0 |
| 517 |
#endif |
| 518 |
|
| 519 |
do i = 1, N |
| 520 |
if (b(i) .ne. exp) STOP 36 |
| 521 |
end do |
| 522 |
|
| 523 |
a(:) = 16.0 |
| 524 |
|
| 525 |
!$acc kernels self (0 /= 1) ! { dg-line l_compute[incr c_compute] } |
| 526 |
! { dg-note {OpenACC 'kernels' decomposition: variable 'i' in 'copy' clause requested to be made addressable} {} { target *-*-* } l_compute$c_compute } |
| 527 |
! { dg-note {variable 'i' already made addressable} {} { target *-*-* } l_compute$c_compute } */ |
| 528 |
! { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} "" { target *-*-* } .+1 } |
| 529 |
do i = 1, N |
| 530 |
! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_compute$c_compute } |
| 531 |
if (acc_on_device (acc_device_host) .eqv. .TRUE.) then |
| 532 |
b(i) = a(i) + 1 |
| 533 |
else |
| 534 |
b(i) = a(i) |
| 535 |
end if |
| 536 |
end do |
| 537 |
!$acc end kernels |
| 538 |
|
| 539 |
do i = 1, N |
| 540 |
if (b(i) .ne. 17.0) STOP 37 |
| 541 |
end do |
| 542 |
|
| 543 |
a(:) = 8.0 |
| 544 |
|
| 545 |
!$acc kernels copyin (a(1:N)) copyout (b(1:N)) self (one /= 1) ! { dg-line l_compute[incr c_compute] } |
| 546 |
! { dg-note {OpenACC 'kernels' decomposition: variable 'i' in 'copy' clause requested to be made addressable} {} { target *-*-* } l_compute$c_compute } |
| 547 |
! { dg-note {variable 'i' already made addressable} {} { target *-*-* } l_compute$c_compute } */ |
| 548 |
! { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} "" { target *-*-* } .+1 } |
| 549 |
do i = 1, N |
| 550 |
! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_compute$c_compute } |
| 551 |
if (acc_on_device (acc_device_host) .eqv. .TRUE.) then |
| 552 |
b(i) = a(i) + 1 |
| 553 |
else |
| 554 |
b(i) = a(i) |
| 555 |
end if |
| 556 |
end do |
| 557 |
!$acc end kernels |
| 558 |
|
| 559 |
#if ACC_MEM_SHARED |
| 560 |
exp = 9.0 |
| 561 |
#else |
| 562 |
exp = 8.0 |
| 563 |
#endif |
| 564 |
|
| 565 |
do i = 1, N |
| 566 |
if (b(i) .ne. exp) STOP 38 |
| 567 |
end do |
| 568 |
|
| 569 |
a(:) = 22.0 |
| 570 |
|
| 571 |
!$acc kernels self (zero /= 1) ! { dg-line l_compute[incr c_compute] } |
| 572 |
! { dg-note {OpenACC 'kernels' decomposition: variable 'i' in 'copy' clause requested to be made addressable} {} { target *-*-* } l_compute$c_compute } |
| 573 |
! { dg-note {variable 'i' already made addressable} {} { target *-*-* } l_compute$c_compute } */ |
| 574 |
! { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} "" { target *-*-* } .+1 } |
| 575 |
do i = 1, N |
| 576 |
! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_compute$c_compute } |
| 577 |
if (acc_on_device (acc_device_host) .eqv. .TRUE.) then |
| 578 |
b(i) = a(i) + 1 |
| 579 |
else |
| 580 |
b(i) = a(i) |
| 581 |
end if |
| 582 |
end do |
| 583 |
!$acc end kernels |
| 584 |
|
| 585 |
do i = 1, N |
| 586 |
if (b(i) .ne. 23.0) STOP 39 |
| 587 |
end do |
| 588 |
|
| 589 |
a(:) = 16.0 |
| 590 |
|
| 591 |
!$acc kernels copyin (a(1:N)) copyout (b(1:N)) self (.FALSE.) ! { dg-line l_compute[incr c_compute] } |
| 592 |
! { dg-note {OpenACC 'kernels' decomposition: variable 'i' in 'copy' clause requested to be made addressable} {} { target *-*-* } l_compute$c_compute } |
| 593 |
! { dg-note {variable 'i' already made addressable} {} { target *-*-* } l_compute$c_compute } */ |
| 594 |
! { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} "" { target *-*-* } .+1 } |
| 595 |
do i = 1, N |
| 596 |
! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_compute$c_compute } |
| 597 |
if (acc_on_device (acc_device_host) .eqv. .TRUE.) then |
| 598 |
b(i) = a(i) + 1 |
| 599 |
else |
| 600 |
b(i) = a(i) |
| 601 |
end if |
| 602 |
end do |
| 603 |
!$acc end kernels |
| 604 |
|
| 605 |
#if ACC_MEM_SHARED |
| 606 |
exp = 17.0; |
| 607 |
#else |
| 608 |
exp = 16.0; |
| 609 |
#endif |
| 610 |
|
| 611 |
do i = 1, N |
| 612 |
if (b(i) .ne. exp) STOP 40 |
| 613 |
end do |
| 614 |
|
| 615 |
a(:) = 76.0 |
| 616 |
|
| 617 |
!$acc kernels self (.TRUE.) ! { dg-line l_compute[incr c_compute] } |
| 618 |
! { dg-note {OpenACC 'kernels' decomposition: variable 'i' in 'copy' clause requested to be made addressable} {} { target *-*-* } l_compute$c_compute } |
| 619 |
! { dg-note {variable 'i' already made addressable} {} { target *-*-* } l_compute$c_compute } */ |
| 620 |
! { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} "" { target *-*-* } .+1 } |
| 621 |
do i = 1, N |
| 622 |
! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_compute$c_compute } |
| 623 |
if (acc_on_device (acc_device_host) .eqv. .TRUE.) then |
| 624 |
b(i) = a(i) + 1 |
| 625 |
else |
| 626 |
b(i) = a(i) |
| 627 |
end if |
| 628 |
end do |
| 629 |
!$acc end kernels |
| 630 |
|
| 631 |
do i = 1, N |
| 632 |
if (b(i) .ne. 77.0) STOP 41 |
| 633 |
end do |
| 634 |
|
| 635 |
a(:) = 22.0 |
| 636 |
|
| 637 |
nn = 1 |
| 638 |
|
| 639 |
!$acc kernels copyin (a(1:N)) copyout (b(1:N)) self (nn /= 1) ! { dg-line l_compute[incr c_compute] } |
| 640 |
! { dg-note {OpenACC 'kernels' decomposition: variable 'i' in 'copy' clause requested to be made addressable} {} { target *-*-* } l_compute$c_compute } |
| 641 |
! { dg-note {variable 'i' already made addressable} {} { target *-*-* } l_compute$c_compute } */ |
| 642 |
! { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} "" { target *-*-* } .+1 } |
| 643 |
do i = 1, N |
| 644 |
! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_compute$c_compute } |
| 645 |
if (acc_on_device (acc_device_host) .eqv. .TRUE.) then |
| 646 |
b(i) = a(i) + 1 |
| 647 |
else |
| 648 |
b(i) = a(i) |
| 649 |
end if |
| 650 |
end do |
| 651 |
!$acc end kernels |
| 652 |
|
| 653 |
#if ACC_MEM_SHARED |
| 654 |
exp = 23.0; |
| 655 |
#else |
| 656 |
exp = 22.0; |
| 657 |
#endif |
| 658 |
|
| 659 |
do i = 1, N |
| 660 |
if (b(i) .ne. exp) STOP 42 |
| 661 |
end do |
| 662 |
|
| 663 |
a(:) = 18.0 |
| 664 |
|
| 665 |
nn = 0 |
| 666 |
|
| 667 |
!$acc kernels self (nn /= 1) ! { dg-line l_compute[incr c_compute] } |
| 668 |
! { dg-note {OpenACC 'kernels' decomposition: variable 'i' in 'copy' clause requested to be made addressable} {} { target *-*-* } l_compute$c_compute } |
| 669 |
! { dg-note {variable 'i' already made addressable} {} { target *-*-* } l_compute$c_compute } */ |
| 670 |
! { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} "" { target *-*-* } .+1 } |
| 671 |
do i = 1, N |
| 672 |
! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_compute$c_compute } |
| 673 |
if (acc_on_device (acc_device_host) .eqv. .TRUE.) then |
| 674 |
b(i) = a(i) + 1 |
| 675 |
else |
| 676 |
b(i) = a(i) |
| 677 |
end if |
| 678 |
end do |
| 679 |
!$acc end kernels |
| 680 |
|
| 681 |
do i = 1, N |
| 682 |
if (b(i) .ne. 19.0) STOP 43 |
| 683 |
end do |
| 684 |
|
| 685 |
a(:) = 49.0 |
| 686 |
|
| 687 |
nn = 1 |
| 688 |
|
| 689 |
!$acc kernels copyin (a(1:N)) copyout (b(1:N)) self (.NOT. ((nn + nn) > 0)) ! { dg-line l_compute[incr c_compute] } |
| 690 |
! { dg-note {OpenACC 'kernels' decomposition: variable 'i' in 'copy' clause requested to be made addressable} {} { target *-*-* } l_compute$c_compute } |
| 691 |
! { dg-note {variable 'i' already made addressable} {} { target *-*-* } l_compute$c_compute } */ |
| 692 |
! { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} "" { target *-*-* } .+1 } |
| 693 |
do i = 1, N |
| 694 |
! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_compute$c_compute } |
| 695 |
if (acc_on_device (acc_device_host) .eqv. .TRUE.) then |
| 696 |
b(i) = a(i) + 1 |
| 697 |
else |
| 698 |
b(i) = a(i) |
| 699 |
end if |
| 700 |
end do |
| 701 |
!$acc end kernels |
| 702 |
|
| 703 |
#if ACC_MEM_SHARED |
| 704 |
exp = 50.0 |
| 705 |
#else |
| 706 |
exp = 49.0 |
| 707 |
#endif |
| 708 |
|
| 709 |
do i = 1, N |
| 710 |
if (b(i) .ne. exp) STOP 44 |
| 711 |
end do |
| 712 |
|
| 713 |
a(:) = 38.0 |
| 714 |
|
| 715 |
nn = 0; |
| 716 |
|
| 717 |
!$acc kernels copyin (a(1:N)) copyout (b(1:N)) self (.NOT. ((nn + nn) > 0)) ! { dg-line l_compute[incr c_compute] } |
| 718 |
! { dg-note {OpenACC 'kernels' decomposition: variable 'i' in 'copy' clause requested to be made addressable} {} { target *-*-* } l_compute$c_compute } |
| 719 |
! { dg-note {variable 'i' already made addressable} {} { target *-*-* } l_compute$c_compute } */ |
| 720 |
! { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} "" { target *-*-* } .+1 } |
| 721 |
do i = 1, N |
| 722 |
! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_compute$c_compute } |
| 723 |
if (acc_on_device (acc_device_host) .eqv. .TRUE.) then |
| 724 |
b(i) = a(i) + 1 |
| 725 |
else |
| 726 |
b(i) = a(i) |
| 727 |
end if |
| 728 |
end do |
| 729 |
!$acc end kernels |
| 730 |
|
| 731 |
do i = 1, N |
| 732 |
if (b(i) .ne. 39.0) STOP 45 |
| 733 |
end do |
| 734 |
|
| 735 |
a(:) = 91.0 |
| 736 |
|
| 737 |
!$acc kernels copyin (a(1:N)) copyout (b(1:N)) self (.NOT. (-2 > 0)) ! { dg-line l_compute[incr c_compute] } |
| 738 |
! { dg-note {OpenACC 'kernels' decomposition: variable 'i' in 'copy' clause requested to be made addressable} {} { target *-*-* } l_compute$c_compute } |
| 739 |
! { dg-note {variable 'i' already made addressable} {} { target *-*-* } l_compute$c_compute } */ |
| 740 |
! { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} "" { target *-*-* } .+1 } |
| 741 |
do i = 1, N |
| 742 |
! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_compute$c_compute } |
| 743 |
if (acc_on_device (acc_device_host) .eqv. .TRUE.) then |
| 744 |
b(i) = a(i) + 1 |
| 745 |
else |
| 746 |
b(i) = a(i) |
| 747 |
end if |
| 748 |
end do |
| 749 |
!$acc end kernels |
| 750 |
|
| 751 |
do i = 1, N |
| 752 |
if (b(i) .ne. 92.0) STOP 46 |
| 753 |
end do |
| 754 |
|
| 755 |
a(:) = 43.0 |
| 756 |
|
| 757 |
!$acc kernels copyin (a(1:N)) copyout (b(1:N)) self (one /= 1) ! { dg-line l_compute[incr c_compute] } |
| 758 |
! { dg-note {OpenACC 'kernels' decomposition: variable 'i' in 'copy' clause requested to be made addressable} {} { target *-*-* } l_compute$c_compute } |
| 759 |
! { dg-note {variable 'i' already made addressable} {} { target *-*-* } l_compute$c_compute } */ |
| 760 |
! { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} "" { target *-*-* } .+1 } |
| 761 |
do i = 1, N |
| 762 |
! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_compute$c_compute } |
| 763 |
if (acc_on_device (acc_device_host) .eqv. .TRUE.) then |
| 764 |
b(i) = a(i) + 1 |
| 765 |
else |
| 766 |
b(i) = a(i) |
| 767 |
end if |
| 768 |
end do |
| 769 |
!$acc end kernels |
| 770 |
|
| 771 |
#if ACC_MEM_SHARED |
| 772 |
exp = 44.0 |
| 773 |
#else |
| 774 |
exp = 43.0 |
| 775 |
#endif |
| 776 |
|
| 777 |
do i = 1, N |
| 778 |
if (b(i) .ne. exp) STOP 47 |
| 779 |
end do |
| 780 |
|
| 781 |
a(:) = 87.0 |
| 782 |
|
| 783 |
!$acc kernels self (one /= 0) ! { dg-line l_compute[incr c_compute] } |
| 784 |
! { dg-note {OpenACC 'kernels' decomposition: variable 'i' in 'copy' clause requested to be made addressable} {} { target *-*-* } l_compute$c_compute } |
| 785 |
! { dg-note {variable 'i' already made addressable} {} { target *-*-* } l_compute$c_compute } */ |
| 786 |
! { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} "" { target *-*-* } .+1 } |
| 787 |
do i = 1, N |
| 788 |
! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_compute$c_compute } |
| 789 |
if (acc_on_device (acc_device_host) .eqv. .TRUE.) then |
| 790 |
b(i) = a(i) + 1 |
| 791 |
else |
| 792 |
b(i) = a(i) |
| 793 |
end if |
| 794 |
end do |
| 795 |
!$acc end kernels |
| 796 |
|
| 797 |
do i = 1, N |
| 798 |
if (b(i) .ne. 88.0) STOP 48 |
| 799 |
end do |
| 800 |
|
| 801 |
a(:) = 3.0 |
| 802 |
b(:) = 9.0 |
| 803 |
|
| 804 |
#if ACC_MEM_SHARED |
| 805 |
exp = 0.0 |
| 806 |
exp2 = 0.0 |
| 807 |
#else |
| 808 |
call acc_copyin (a, sizeof (a)) |
| 809 |
call acc_copyin (b, sizeof (b)) |
| 810 |
exp = 3.0; |
| 811 |
exp2 = 9.0; |
| 812 |
#endif |
| 813 |
|
| 814 |
!$acc update device (a(1:N), b(1:N)) if (1 == 1) |
| 815 |
|
| 816 |
a(:) = 0.0 |
| 817 |
b(:) = 0.0 |
| 818 |
|
| 819 |
!$acc update host (a(1:N), b(1:N)) if (1 == 1) |
| 820 |
|
| 821 |
do i = 1, N |
| 822 |
if (a(i) .ne. exp) STOP 49 |
| 823 |
if (b(i) .ne. exp2) STOP 50 |
| 824 |
end do |
| 825 |
|
| 826 |
a(:) = 6.0 |
| 827 |
b(:) = 12.0 |
| 828 |
|
| 829 |
!$acc update device (a(1:N), b(1:N)) if (0 == 1) |
| 830 |
|
| 831 |
a(:) = 0.0 |
| 832 |
b(:) = 0.0 |
| 833 |
|
| 834 |
!$acc update host (a(1:N), b(1:N)) if (1 == 1) |
| 835 |
|
| 836 |
do i = 1, N |
| 837 |
if (a(i) .ne. exp) STOP 51 |
| 838 |
if (b(i) .ne. exp2) STOP 52 |
| 839 |
end do |
| 840 |
|
| 841 |
a(:) = 26.0 |
| 842 |
b(:) = 21.0 |
| 843 |
|
| 844 |
!$acc update device (a(1:N), b(1:N)) if (1 == 1) |
| 845 |
|
| 846 |
a(:) = 0.0 |
| 847 |
b(:) = 0.0 |
| 848 |
|
| 849 |
!$acc update host (a(1:N), b(1:N)) if (0 == 1) |
| 850 |
|
| 851 |
do i = 1, N |
| 852 |
if (a(i) .ne. 0.0) STOP 53 |
| 853 |
if (b(i) .ne. 0.0) STOP 54 |
| 854 |
end do |
| 855 |
|
| 856 |
#if !ACC_MEM_SHARED |
| 857 |
call acc_copyout (a, sizeof (a)) |
| 858 |
call acc_copyout (b, sizeof (b)) |
| 859 |
#endif |
| 860 |
|
| 861 |
a(:) = 4.0 |
| 862 |
b(:) = 0.0 |
| 863 |
|
| 864 |
!$acc data copyin (a(1:N)) copyout (b(1:N)) if (1 == 1) |
| 865 |
! { dg-note {variable 'parm\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } |
| 866 |
|
| 867 |
!$acc kernels present (a(1:N)) ! { dg-line l_compute[incr c_compute] } |
| 868 |
! { dg-note {OpenACC 'kernels' decomposition: variable 'i' in 'copy' clause requested to be made addressable} {} { target *-*-* } l_compute$c_compute } |
| 869 |
! { dg-note {variable 'i' already made addressable} {} { target *-*-* } l_compute$c_compute } */ |
| 870 |
! { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} "" { target *-*-* } .+1 } |
| 871 |
do i = 1, N |
| 872 |
b(i) = a(i) |
| 873 |
end do |
| 874 |
!$acc end kernels |
| 875 |
!$acc end data |
| 876 |
|
| 877 |
do i = 1, N |
| 878 |
if (b(i) .ne. 4.0) STOP 55 |
| 879 |
end do |
| 880 |
|
| 881 |
a(:) = 8.0 |
| 882 |
b(:) = 1.0 |
| 883 |
|
| 884 |
!$acc data copyin (a(1:N)) copyout (b(1:N)) if (0 == 1) |
| 885 |
! { dg-note {variable 'parm\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: artificial} "" { target { ! openacc_host_selected } } .-1 } |
| 886 |
|
| 887 |
#if !ACC_MEM_SHARED |
| 888 |
if (acc_is_present (a) .eqv. .TRUE.) STOP 56 |
| 889 |
if (acc_is_present (b) .eqv. .TRUE.) STOP 57 |
| 890 |
#endif |
| 891 |
|
| 892 |
!$acc end data |
| 893 |
|
| 894 |
a(:) = 18.0 |
| 895 |
b(:) = 21.0 |
| 896 |
|
| 897 |
!$acc data copyin (a(1:N)) if (1 == 1) |
| 898 |
! { dg-note {variable 'parm\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } |
| 899 |
! { dg-note {variable 'parm\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: artificial} "" { target { ! openacc_host_selected } } .-2 } |
| 900 |
|
| 901 |
#if !ACC_MEM_SHARED |
| 902 |
if (acc_is_present (a) .eqv. .FALSE.) STOP 58 |
| 903 |
#endif |
| 904 |
|
| 905 |
!$acc data copyout (b(1:N)) if (0 == 1) |
| 906 |
! { dg-note {variable 'parm\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } |
| 907 |
! { dg-note {variable 'parm\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: artificial} "" { target { ! openacc_host_selected } } .-2 } |
| 908 |
#if !ACC_MEM_SHARED |
| 909 |
if (acc_is_present (b) .eqv. .TRUE.) STOP 59 |
| 910 |
#endif |
| 911 |
!$acc data copyout (b(1:N)) if (1 == 1) |
| 912 |
! { dg-note {variable 'parm\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } |
| 913 |
|
| 914 |
!$acc kernels present (a(1:N)) present (b(1:N)) ! { dg-line l_compute[incr c_compute] } |
| 915 |
! { dg-note {OpenACC 'kernels' decomposition: variable 'i' in 'copy' clause requested to be made addressable} {} { target *-*-* } l_compute$c_compute } |
| 916 |
! { dg-note {variable 'i' already made addressable} {} { target *-*-* } l_compute$c_compute } */ |
| 917 |
! { dg-note {beginning 'parloops' part in OpenACC 'kernels' region} "" { target *-*-* } .+1 } |
| 918 |
do i = 1, N |
| 919 |
b(i) = a(i) |
| 920 |
end do |
| 921 |
!$acc end kernels |
| 922 |
|
| 923 |
!$acc end data |
| 924 |
|
| 925 |
#if !ACC_MEM_SHARED |
| 926 |
if (acc_is_present (b) .eqv. .TRUE.) STOP 60 |
| 927 |
#endif |
| 928 |
!$acc end data |
| 929 |
!$acc end data |
| 930 |
|
| 931 |
do i = 1, N |
| 932 |
if (b(1) .ne. 18.0) STOP 61 |
| 933 |
end do |
| 934 |
|
| 935 |
!$acc enter data copyin (b(1:N)) if (0 == 1) |
| 936 |
|
| 937 |
#if !ACC_MEM_SHARED |
| 938 |
if (acc_is_present (b) .eqv. .TRUE.) STOP 62 |
| 939 |
#endif |
| 940 |
|
| 941 |
!$acc exit data delete (b(1:N)) if (0 == 1) |
| 942 |
|
| 943 |
!$acc enter data copyin (b(1:N)) if (1 == 1) |
| 944 |
|
| 945 |
#if !ACC_MEM_SHARED |
| 946 |
if (acc_is_present (b) .eqv. .FALSE.) STOP 63 |
| 947 |
#endif |
| 948 |
|
| 949 |
!$acc exit data delete (b(1:N)) if (1 == 1) |
| 950 |
|
| 951 |
#if !ACC_MEM_SHARED |
| 952 |
if (acc_is_present (b) .eqv. .TRUE.) STOP 64 |
| 953 |
#endif |
| 954 |
|
| 955 |
!$acc enter data copyin (b(1:N)) if (zero == 1) |
| 956 |
|
| 957 |
#if !ACC_MEM_SHARED |
| 958 |
if (acc_is_present (b) .eqv. .TRUE.) STOP 65 |
| 959 |
#endif |
| 960 |
|
| 961 |
!$acc exit data delete (b(1:N)) if (zero == 1) |
| 962 |
|
| 963 |
!$acc enter data copyin (b(1:N)) if (one == 1) |
| 964 |
|
| 965 |
#if !ACC_MEM_SHARED |
| 966 |
if (acc_is_present (b) .eqv. .FALSE.) STOP 66 |
| 967 |
#endif |
| 968 |
|
| 969 |
!$acc exit data delete (b(1:N)) if (one == 1) |
| 970 |
|
| 971 |
#if !ACC_MEM_SHARED |
| 972 |
if (acc_is_present (b) .eqv. .TRUE.) STOP 67 |
| 973 |
#endif |
| 974 |
|
| 975 |
!$acc enter data copyin (b(1:N)) if (one == 0) |
| 976 |
|
| 977 |
#if !ACC_MEM_SHARED |
| 978 |
if (acc_is_present (b) .eqv. .TRUE.) STOP 68 |
| 979 |
#endif |
| 980 |
|
| 981 |
!$acc exit data delete (b(1:N)) if (one == 0) |
| 982 |
|
| 983 |
!$acc enter data copyin (b(1:N)) if (one == 1) |
| 984 |
|
| 985 |
#if !ACC_MEM_SHARED |
| 986 |
if (acc_is_present (b) .eqv. .FALSE.) STOP 69 |
| 987 |
#endif |
| 988 |
|
| 989 |
!$acc exit data delete (b(1:N)) if (one == 1) |
| 990 |
|
| 991 |
#if !ACC_MEM_SHARED |
| 992 |
if (acc_is_present (b) .eqv. .TRUE.) STOP 70 |
| 993 |
#endif |
| 994 |
|
| 995 |
end program main |