1 ! REQUIRES: openmp_runtime
3 ! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags
5 ! 2.11.3 allocate Directive
6 ! List items specified in an allocate directive that is associated
7 ! with an allocate statement must be variables that are allocated
8 ! by the allocate statement.
12 integer, dimension(:), allocatable
:: a
, b
, c
, d
, e
, f
, &
15 !$omp allocate(a) allocator(omp_default_mem_alloc)
18 !$omp allocate(c, d) allocator(omp_default_mem_alloc)
21 !$omp allocate(e) allocator(omp_default_mem_alloc)
22 !$omp allocate(f, g) allocator(omp_default_mem_alloc)
24 allocate(e(5), f(6), g(7))
26 !ERROR: Object 'i' in ALLOCATE directive not found in corresponding ALLOCATE statement
27 !$omp allocate(h, i) allocator(omp_default_mem_alloc)
30 !ERROR: Object 'j' in ALLOCATE directive not found in corresponding ALLOCATE statement
31 !$omp allocate(j, k) allocator(omp_default_mem_alloc)
32 !$omp allocate(l) allocator(omp_default_mem_alloc)
35 end subroutine allocate