brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 89beaa0 Raw
28 lines · plain
1! REQUIRES: openmp_runtime2 3! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags -fopenmp-version=504! OpenMP Version 5.05! 2.11.3 allocate Directive6! If list items within the ALLOCATE directive have the SAVE attribute, are a7! common block name, or are declared in the scope of a module, then only8! predefined memory allocator parameters can be used in the allocator clause9 10module AllocateModule11  INTEGER :: z12  !ERROR: If a list item is a named common block, has SAVE attribute or is declared in the scope of a module, an ALLOCATOR clause must be present with a predefined allocator13  !$omp allocate(z)14end module15 16subroutine allocate(custom_allocator)17use omp_lib18use AllocateModule19  integer, SAVE :: x20  integer :: w21  COMMON /CommonName/ y22 23  integer(kind=omp_allocator_handle_kind) :: custom_allocator24 25  !ERROR: If a list item is a named common block, has SAVE attribute or is declared in the scope of a module, an ALLOCATOR clause must be present with a predefined allocator26  !$omp allocate(x)27end subroutine allocate28