[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Semantics / OpenMP / omp-parallel-shared02.f90
blobf46cfa17ba38fc55c0e7170a99ac163fb7be167f
1 !RUN: %python %S/../test_errors.py %s %flang -fopenmp
2 ! OpenMP Version 4.5
3 ! 2.15.3.2 parallel shared Clause
4 program omp_parallel_shared
5 integer :: i, j, a(10), b(10), c(10)
6 integer :: k = 10
7 integer :: array(10)
9 do i = 1, 10
10 array(i) = i
11 end do
13 !ERROR: A variable that is part of another variable (as an array or structure element) cannot appear in a PRIVATE or SHARED clause
14 !$omp parallel shared(array(i))
15 do i = 1, 10
16 c(i) = a(i) + b(i) + k
17 array(i) = k
18 end do
19 !$omp end parallel
20 end program omp_parallel_shared