xref: /llvm-project/flang/test/Semantics/OpenMP/allocators03.f90 (revision 15710bbdadddbf03428fd16aed53e6be54960703)
1! REQUIRES: openmp_runtime
2
3! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags
4! OpenMP Version 5.2
5! 6.7 allocators construct
6! Only the allocate clause is allowed on the allocators construct
7
8subroutine allocate()
9use omp_lib
10
11  integer, allocatable :: arr1(:), arr2(:)
12
13  !ERROR: PRIVATE clause is not allowed on the ALLOCATORS directive
14  !$omp allocators allocate(arr1) private(arr2)
15    allocate(arr1(23), arr2(2))
16
17end subroutine allocate
18