Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / OpenMP / allocate06.f90
blob68a7e8857eb8978d4431beb020cf3becb249708a
1 ! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
2 ! OpenMP Version 5.0
3 ! 2.11.3 allocate Directive
4 ! List items specified in the allocate directive must not have the ALLOCATABLE attribute unless the directive is associated with an
5 ! allocate statement.
7 subroutine allocate()
8 use omp_lib
9 integer :: a, b, x
10 real, dimension (:,:), allocatable :: darray
12 !ERROR: List items specified in the ALLOCATE directive must not have the ALLOCATABLE attribute unless the directive is associated with an ALLOCATE statement
13 !$omp allocate(darray) allocator(omp_default_mem_alloc)
15 !$omp allocate(darray) allocator(omp_default_mem_alloc)
16 allocate(darray(a, b))
18 end subroutine allocate