| 1 |
! { dg-do compile } |
| 2 |
|
| 3 |
! PR fortran/78260 |
| 4 |
|
| 5 |
module m |
| 6 |
implicit none |
| 7 |
integer :: n = 0 |
| 8 |
contains |
| 9 |
subroutine s |
| 10 |
!$omp target data map(m) ! { dg-error "Object .m. is not a variable" } |
| 11 |
!$omp target update to(m) ! { dg-error "Object .m. is not a variable" } |
| 12 |
n = n + 1 |
| 13 |
!$omp end target data |
| 14 |
end subroutine s |
| 15 |
subroutine s2 |
| 16 |
!$omp target data map(s2) ! { dg-error "Object .s2. is not a variable" } |
| 17 |
!$omp target update to(s2) ! { dg-error "Object .s2. is not a variable" } |
| 18 |
n = n + 1 |
| 19 |
!$omp end target data |
| 20 |
end subroutine s2 |
| 21 |
integer function f1() |
| 22 |
!$omp target data map(f1) ! OK, f1 is also the result variable |
| 23 |
!$omp target update to(f1) ! OK, f1 is also the result variable |
| 24 |
f1 = 5 |
| 25 |
!$omp end target data |
| 26 |
end function f1 |
| 27 |
integer function f2() result(res) |
| 28 |
!$omp target data map(f2) ! { dg-error "Object .f2. is not a variable" } |
| 29 |
!$omp target update to(f2) ! { dg-error "Object .f2. is not a variable" } |
| 30 |
res = 5 |
| 31 |
!$omp end target data |
| 32 |
end function f2 |
| 33 |
end module m |