[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Semantics / OpenMP / omp-parallel-private04.f90
blobdbab1564e40fd56849e83284331694fcb3cffa24
1 !RUN: %python %S/../test_errors.py %s %flang -fopenmp
2 ! OpenMP Version 4.5
3 ! 2.15.3.3 parallel private Clause
4 program omp_parallel_private
5 integer :: i, j, a(10), b(10), c(10)
6 integer :: k = 10
7 type my_type
8 integer :: array(10)
9 end type my_type
11 type(my_type) :: my_var
13 real :: arr(10)
14 integer :: intx = 10
16 do i = 1, 10
17 arr(i) = 0.0
18 end do
20 !ERROR: A variable that is part of another variable (as an array or structure element) cannot appear in a PRIVATE or SHARED clause
21 !$omp parallel private(arr,intx,my_var%array(1))
22 do i = 1, 10
23 c(i) = a(i) + b(i) + k
24 my_var%array(i) = k+intx
25 arr(i) = k
26 end do
27 !$omp end parallel
28 end program omp_parallel_private