Debian Codegraph @

flang/test/Semantics/OpenMP/allocate-directive.f90

raw
1 ! REQUIRES: openmp_runtime
2
3 ! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags
4 ! Check OpenMP Allocate directive
5 use omp_lib
6
7 ! 2.11.3 declarative allocate
8 ! 2.11.3 executable allocate
9
10 integer :: x, y
11 integer, allocatable :: a, b, m, n, t, z
12 !$omp allocate(x, y)
13 !$omp allocate(x, y) allocator(omp_default_mem_alloc)
14
15 !$omp allocate(a, b)
16 allocate ( a, b )
17
18 !$omp allocate(a, b) allocator(omp_default_mem_alloc)
19 allocate ( a, b )
20
21 !$omp allocate(t) allocator(omp_const_mem_alloc)
22 !$omp allocate(z) allocator(omp_default_mem_alloc)
23 !$omp allocate(m) allocator(omp_default_mem_alloc)
24 !$omp allocate(n)
25 allocate ( t, z, m, n )
26
27 end