[WebAssembly] Fix asan issue from https://reviews.llvm.org/D121349
[llvm-project.git] / flang / test / Semantics / omp-allocate04.f90
blobd5d97305756edef590395e3193dd543f26721d86
1 ! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
2 ! OpenMP Version 5.0
3 ! 2.11.3 allocate Directive
4 ! Only the allocator clause is allowed on the allocate directive
5 subroutine allocate()
6 use omp_lib
8 integer :: x, y
10 !$omp allocate(x) allocator(omp_default_mem_alloc)
12 !ERROR: PRIVATE clause is not allowed on the ALLOCATE directive
13 !$omp allocate(y) private(y)
14 end subroutine allocate