[clangd] Re-land "support outgoing calls in call hierarchy" (#117673)
[llvm-project.git] / flang / test / Semantics / OpenMP / lastprivate03.f90
blobd7fe0c162f27c3a8bc5233c9f4e46648c3c6dcdd
1 ! RUN: %python %S/../test_errors.py %s %flang -fopenmp
2 ! OpenMP Version 5.2, Sections 3.2.1 & 5.3
3 subroutine omp_lastprivate(init)
4 integer :: init
5 integer :: i, a(10)
6 type my_type
7 integer :: val
8 end type my_type
9 type(my_type) :: my_var
11 !ERROR: A variable that is part of another variable (as an array or structure element) cannot appear in a LASTPRIVATE clause
12 !$omp do lastprivate(a(2))
13 do i=1, 10
14 a(2) = init
15 end do
16 !$omp end do
18 !ERROR: A variable that is part of another variable (as an array or structure element) cannot appear in a LASTPRIVATE clause
19 !$omp do lastprivate(my_var%val)
20 do i=1, 10
21 my_var%val = init
22 end do
23 !$omp end do
24 end subroutine