brintos

brintos / llvm-project-archived public Read only

0
0
Text · 815 B · b5f7864 Raw
27 lines · plain
1! REQUIRES: openmp_runtime2 3! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags4! OpenMP Version 5.05! 2.11.3 allocate Directive6! allocate directives that appear in a target region must specify an allocator7! clause unless a requires directive with the dynamic_allocators clause is present8! in the same compilation unit.9 10subroutine allocate()11use omp_lib12  integer :: a, b13  real, dimension (:,:), allocatable :: darray14 15  !$omp target16      !$omp allocate allocator(omp_default_mem_alloc)17          allocate ( darray(a, b) )18  !$omp end target19 20  !$omp target21      !ERROR: An ALLOCATE directive in a TARGET region must specify an ALLOCATOR clause or REQUIRES(DYNAMIC_ALLOCATORS) must be specified22      !$omp allocate23          allocate ( darray(a, b) )24  !$omp end target25 26end subroutine allocate27