1 ! REQUIRES: openmp_runtime
3 ! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags -fopenmp-version=50
5 ! Inherited from 2.11.3 allocate Directive
6 ! If list items within the ALLOCATE directive have the SAVE attribute, are a common block name, or are declared in the scope of a
7 ! module, then only predefined memory allocator parameters can be used in the allocator clause
8 ! SAVE and common block names can't be declared as allocatable, only module scope variables are tested
11 integer, allocatable
:: a
, b
18 integer(kind
=omp_allocator_handle_kind
) :: custom_allocator
19 type(omp_alloctrait
) :: trait(1)
21 trait(1)%key = fallback
22 trait(1)%value
= default_mem_fb
23 custom_allocator
= omp_init_allocator(omp_default_mem_space
, 1, trait
)
25 !$omp allocators allocate(omp_default_mem_alloc: a)
28 !ERROR: If list items within the ALLOCATORS directive have the SAVE attribute, are a common block name, or are declared in the scope of a module, then only predefined memory allocator parameters can be used in the allocator clause
29 !$omp allocators allocate(custom_allocator: b)