| 1 |
! { dg-do compile } |
| 2 |
subroutine test(b,c,d) |
| 3 |
implicit none |
| 4 |
integer, value, target :: b |
| 5 |
integer, pointer :: c |
| 6 |
integer, allocatable, target :: d |
| 7 |
|
| 8 |
integer, target :: a(5) |
| 9 |
|
| 10 |
!$omp target is_device_ptr(a) ! Valid since OpenMP 5.1 |
| 11 |
!$omp end target |
| 12 |
|
| 13 |
!$omp target is_device_ptr(b) ! Valid since OpenMP 5.1 |
| 14 |
!$omp end target |
| 15 |
|
| 16 |
!$omp target is_device_ptr(c) ! Valid since OpenMP 5.1 |
| 17 |
!$omp end target |
| 18 |
|
| 19 |
!$omp target is_device_ptr(d) ! Valid since OpenMP 5.1 |
| 20 |
!$omp end target |
| 21 |
|
| 22 |
!$omp target data map(a) use_device_addr(a) ! Should be okay |
| 23 |
!$omp end target data |
| 24 |
|
| 25 |
!$omp target data map(c) use_device_ptr(c) ! Should be okay |
| 26 |
!$omp end target data |
| 27 |
end subroutine test |