| 1 |
! { dg-do compile } |
| 2 |
|
| 3 |
subroutine foo(x) |
| 4 |
implicit none |
| 5 |
integer :: x |
| 6 |
integer :: i |
| 7 |
|
| 8 |
!$omp parallel do simd private (x) allocate (x) ! { dg-error "'x' specified in 'allocate' clause at .1. but not in an explicit privatization clause" } |
| 9 |
do i = 1, 64 |
| 10 |
x = i |
| 11 |
end do |
| 12 |
!$omp end parallel do simd |
| 13 |
|
| 14 |
end subroutine |
| 15 |
|
| 16 |
subroutine bar(a) |
| 17 |
implicit none |
| 18 |
integer :: a |
| 19 |
!$omp target |
| 20 |
!$omp parallel private (a) allocate(a) ! { dg-error "'allocate' clause must specify an allocator here" } |
| 21 |
a = 20 |
| 22 |
!$omp end parallel |
| 23 |
!$omp end target |
| 24 |
|
| 25 |
!$omp target private(a) allocate(a) ! { dg-error "'allocate' clause must specify an allocator here" } |
| 26 |
a = 30; |
| 27 |
!$omp end target |
| 28 |
end subroutine |