[clangd] Re-land "support outgoing calls in call hierarchy" (#117673)
[llvm-project.git] / flang / test / Semantics / OpenMP / threadprivate06.f90
blobf31c38f6f2b248f0a495cc8b2af3ac03f1d9b20c
1 ! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
2 ! OpenMP Version 5.1
3 ! Check OpenMP construct validity for the following directives:
4 ! 2.21.2 Threadprivate Directive
6 program main
7 call sub1()
8 print *, 'pass'
9 end program main
11 subroutine sub1()
12 common /c/ a
13 !$omp threadprivate(/c/)
14 integer :: a
16 a = 100
17 call sub2()
18 if (a .ne. 101) print *, 'err'
20 contains
21 subroutine sub2()
22 common /c/ a
23 !$omp threadprivate(/c/)
24 integer :: a
26 !$omp parallel copyin(/c/)
27 a = a + 1
28 !$omp end parallel
29 end subroutine
30 end subroutine