You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
693 B
29 lines
693 B
!RUN: %S/test_errors.sh %s %t %f18 -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
|
|
type my_type
|
|
integer :: array(10)
|
|
end type my_type
|
|
|
|
type(my_type) :: my_var
|
|
|
|
real :: arr(10)
|
|
integer :: intx = 10
|
|
|
|
do i = 1, 10
|
|
arr(i) = 0.0
|
|
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(arr,intx,my_var%array(1))
|
|
do i = 1, 10
|
|
c(i) = a(i) + b(i) + k
|
|
my_var%array(i) = k+intx
|
|
arr(i) = k
|
|
end do
|
|
!$omp end parallel
|
|
end program omp_parallel_private
|