brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 5fd75ba Raw
33 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! Only the allocator clause is allowed on the allocate directive7! List item in ALLOCATE directive must not be a dummy argument8! List item in ALLOCATE directive must not have POINTER attribute9! List item in ALLOCATE directive must not be a associate name10subroutine allocate(z)11use omp_lib12use iso_c_binding13 14  type(c_ptr), pointer :: p15  integer :: x, y, z16 17  !ERROR: PRIVATE clause is not allowed on the ALLOCATE directive18  !$omp allocate(y) private(y)19  !ERROR: A list item in a declarative ALLOCATE cannot have the ALLOCATABLE or POINTER attribute20  !$omp allocate(p)21 22  associate (a => x)23  block24  !ERROR: A list item on a declarative ALLOCATE must be declared in the same scope in which the directive appears25  !$omp allocate(x) allocator(omp_default_mem_alloc)26 27  !ERROR: A list item on a declarative ALLOCATE must be declared in the same scope in which the directive appears28  !ERROR: A list item in a declarative ALLOCATE cannot be an associate name29  !$omp allocate(a)30  end block31  end associate32end subroutine allocate33