Debian Codegraph @

gcc/testsuite/gfortran.dg/gomp/allocators-1.f90

raw
1 implicit none
2 integer, allocatable :: a, b
3 integer :: q
4 integer :: arr(2)
5
6 !$omp allocators allocate(align(64): a)
7 block ! { dg-error "expected ALLOCATE statement after !.OMP ALLOCATORS" }
8 end block ! { dg-error "Expecting END PROGRAM statement" }
9
10
11 !$omp allocators allocate(align(64): a)
12 allocate(a, b) ! OK
13 !$omp end allocators
14
15 !$omp allocators allocate(align(128): b)
16 allocate(a, b) ! OK (assuming not allocated)
17
18
19 !$omp allocators allocate(align(64): a)
20 allocate(a, b, stat=arr) ! { dg-error "Stat-variable at .1. must be a scalar INTEGER variable" }
21 !$omp end allocators
22
23
24 !$omp allocators allocate(align(64): a)
25 allocate(q) ! { dg-error "is neither a data pointer nor an allocatable variable" }
26 !$omp end allocators ! { dg-error "Unexpected !.OMP END ALLOCATORS" }
27
28 end