[LoopReroll] Add an extra defensive check to avoid SCEV assertion.
[llvm-project.git] / flang / test / Semantics / omp-allocate06.f90
blobaa75d47b9acf85ca7e1cc5cea8299eae1e05fa03
1 ! RUN: %S/test_errors.sh %s %t %flang_fc1 -fopenmp
2 ! REQUIRES: shell
3 ! OpenMP Version 5.0
4 ! 2.11.3 allocate Directive
5 ! List items specified in the allocate directive must not have the ALLOCATABLE attribute unless the directive is associated with an
6 ! allocate statement.
8 subroutine allocate()
9 use omp_lib
10 integer :: a, b, x
11 real, dimension (:,:), allocatable :: darray
13 !ERROR: List items specified in the ALLOCATE directive must not have the ALLOCATABLE attribute unless the directive is associated with an ALLOCATE statement
14 !$omp allocate(darray) allocator(omp_default_mem_alloc)
16 !$omp allocate(darray) allocator(omp_default_mem_alloc)
17 allocate(darray(a, b))
19 end subroutine allocate