aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/gomp/allocators-1.f90
blob: b39f6d272c1e2b43415e68836e371570f4c720b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
implicit none
integer, allocatable :: a, b
integer :: q
integer :: arr(2)

!$omp allocators allocate(align(64): a)
block  ! { dg-error "expected ALLOCATE statement after !.OMP ALLOCATORS" }
end block ! { dg-error "Expecting END PROGRAM statement" }


!$omp allocators allocate(align(64): a)
  allocate(a, b)  ! OK
!$omp end allocators

!$omp allocators allocate(align(128): b)
  allocate(a, b)  ! OK (assuming not allocated)


!$omp allocators allocate(align(64): a)
  allocate(a, b, stat=arr)  ! { dg-error "Stat-variable at .1. must be a scalar INTEGER variable" }
!$omp end allocators


!$omp allocators allocate(align(64): a)
  allocate(q)  ! { dg-error "is neither a data pointer nor an allocatable variable" }
!$omp end allocators ! { dg-error "Unexpected !.OMP END ALLOCATORS" }

end