1! RUN: %S/test_errors.sh %s %t %flang -fopenmp
2! REQUIRES: shell
3! OpenMP Version 4.5
4! 2.15.3.3 private Clause
5! Pointers with the INTENT(IN) attribute may not appear in a private clause.
6
7subroutine omp_private(p)
8  integer :: a(10), b(10), c(10)
9  integer, pointer, intent(in) :: p
10
11  a = 10
12  b = 20
13
14  !ERROR: Pointer 'p' with the INTENT(IN) attribute may not appear in a PRIVATE clause
15  !$omp parallel private(p)
16  c = a + b + p
17  !$omp end parallel
18
19  print *, c
20
21end subroutine omp_private
22