Files
clang-p2996/flang/test/Semantics/OpenMP/parallel-private02.f90
Kiran Chandramohan 3323a4bd3d [Flang][OpenMP] NFC: Remove omp prefix of test files in OpenMP Semantics
For tests in the OpenMP sub-directory the `omp` prefix is removed.
2023-02-25 11:21:38 +00:00

21 lines
554 B
Fortran

!RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.15.3.3 parallel private Clause
program omp_parallel_private
integer :: i, j, a(10), b(10), c(10)
integer :: k = 10
integer :: array(10)
do i = 1, 10
array(i) = i
end do
!ERROR: A variable that is part of another variable (as an array or structure element) cannot appear in a PRIVATE or SHARED clause
!$omp parallel private(array(i))
do i = 1, 10
c(i) = a(i) + b(i) + k
array(i) = k
end do
!$omp end parallel
end program omp_parallel_private