[WebAssembly] Fix asan issue from https://reviews.llvm.org/D121349
[llvm-project.git] / flang / test / Semantics / omp-private01.f90
blobe5cc4ba7bb39547c1597d2b57dece99e234a5ef6
1 ! RUN: %python %S/test_errors.py %s %flang -fopenmp
2 ! OpenMP Version 4.5
3 ! 2.15.3.3 private Clause
4 ! Pointers with the INTENT(IN) attribute may not appear in a private clause.
6 subroutine omp_private(p)
7 integer :: a(10), b(10), c(10)
8 integer, pointer, intent(in) :: p
10 a = 10
11 b = 20
13 !ERROR: Pointer 'p' with the INTENT(IN) attribute may not appear in a PRIVATE clause
14 !$omp parallel private(p)
15 c = a + b + p
16 !$omp end parallel
18 print *, c
20 end subroutine omp_private