| 1 |
subroutine f |
| 2 |
integer, allocatable :: A1, A2, B(:), C |
| 3 |
!$omp declare target |
| 4 |
|
| 5 |
!$omp allocators ! OK |
| 6 |
allocate(A1) |
| 7 |
|
| 8 |
!$omp allocators allocate(align(8) : a2) ! { dg-error "ALLOCATORS directive at .1. inside a target region must specify an ALLOCATOR modifier for 'a2'" } |
| 9 |
allocate(A2) |
| 10 |
|
| 11 |
!$omp allocate ! { dg-error "ALLOCATE directive at .1. inside a target region must specify an ALLOCATOR clause" } |
| 12 |
allocate(B(5)) |
| 13 |
|
| 14 |
!$omp allocate(c) ! { dg-error "ALLOCATE directive at .1. inside a target region must specify an ALLOCATOR clause for 'c'" } |
| 15 |
allocate(C) |
| 16 |
end |
| 17 |
|
| 18 |
subroutine g |
| 19 |
integer, allocatable :: A1, A2, B(:), C |
| 20 |
|
| 21 |
!$omp target |
| 22 |
!$omp single |
| 23 |
!$omp allocators ! OK |
| 24 |
allocate(A1) |
| 25 |
|
| 26 |
!$omp allocators allocate(align(8) : a2) ! { dg-error "ALLOCATORS directive at .1. inside a target region must specify an ALLOCATOR modifier for 'a2'" } |
| 27 |
allocate(A2) |
| 28 |
|
| 29 |
!$omp allocate ! { dg-error "ALLOCATE directive at .1. inside a target region must specify an ALLOCATOR clause" } |
| 30 |
allocate(B(5)) |
| 31 |
|
| 32 |
!$omp allocate(c) ! { dg-error "ALLOCATE directive at .1. inside a target region must specify an ALLOCATOR clause for 'c'" } |
| 33 |
allocate(C) |
| 34 |
!$omp end single |
| 35 |
!$omp end target |
| 36 |
end |