[clangd] Re-land "support outgoing calls in call hierarchy" (#117673)
[llvm-project.git] / flang / test / Semantics / OpenMP / firstprivate02.f90
blobeb2597cb1cc40cae8584eed6de3782c3140b3e05
1 ! RUN: %python %S/../test_errors.py %s %flang -fopenmp
2 ! OpenMP Version 5.2, Sections 3.2.1 & 5.3
3 subroutine omp_firstprivate(init)
4 integer :: init
5 integer :: 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 FIRSTPRIVATE clause
12 !$omp parallel firstprivate(a(2))
13 a(2) = init
14 !$omp end parallel
16 !ERROR: A variable that is part of another variable (as an array or structure element) cannot appear in a FIRSTPRIVATE clause
17 !$omp parallel firstprivate(my_var%val)
18 my_var%val = init
19 !$omp end parallel
20 end subroutine