[LoopReroll] Add an extra defensive check to avoid SCEV assertion.
[llvm-project.git] / flang / test / Semantics / omp-allocate02.f90
blob1abc7b5781861adaa61680aed42905a97522a073
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 ! At most one allocator clause can appear on the allocate directive.
7 subroutine allocate()
8 use omp_lib
9 integer :: x, y
10 integer :: a, b
11 real, dimension (:,:), allocatable :: darray
13 !$omp allocate(x, y) allocator(omp_default_mem_alloc)
15 !ERROR: At most one ALLOCATOR clause can appear on the ALLOCATE directive
16 !$omp allocate(x, y) allocator(omp_default_mem_alloc) allocator(omp_default_mem_alloc)
18 !$omp allocate(x) allocator(omp_default_mem_alloc)
19 allocate ( darray(a, b) )
21 !ERROR: At most one ALLOCATOR clause can appear on the ALLOCATE directive
22 !$omp allocate(x) allocator(omp_default_mem_alloc) allocator(omp_default_mem_alloc)
23 allocate ( darray(a, b) )
25 end subroutine allocate