[clangd] Re-land "support outgoing calls in call hierarchy" (#117673)
[llvm-project.git] / flang / test / Semantics / OpenMP / declarative-directive02.f90
blobdcde963689eb0dd1b9bd35e95c6c840be05312f5
1 ! RUN: %flang -fsyntax-only -fopenmp %s 2>&1
3 ! Check that OpenMP declarative directives can be used with objects that have
4 ! an incomplete type.
6 subroutine test_decl
7 ! OMPv5.2 5.2 threadprivate
8 ! OMPv5.2 6.5 allocate
9 implicit none
10 save :: x1, y1
11 !$omp threadprivate(x1)
12 !$omp allocate(y1)
13 integer :: x1, y1
15 ! OMPv5.2 7.7 declare-simd
16 external :: simd_func
17 !$omp declare simd(simd_func)
18 logical :: simd_func
20 ! OMPv5.2 7.8.1 declare-target
21 allocatable :: j
22 !$omp declare target(j)
23 save :: j
24 real(kind=8) :: j(:)
26 ! OMPv5.2 5.5.11 declare-reduction - crashes
27 !external :: my_add_red
28 !!$omp declare reduction(my_add_red : integer : my_add_red(omp_out, omp_in)) &
29 !!$omp& initializer(omp_priv=0)
30 !integer :: my_add_red
31 end subroutine
33 subroutine test_decl2
34 save x1, y1
35 !$omp threadprivate(x1)
36 !$omp allocate(y1)
37 integer :: x1, y1
39 ! implicit decl
40 !$omp threadprivate(x2)
41 !$omp allocate(y2)
42 save x2, y2
43 end subroutine
45 module m1
46 ! implicit decl
47 !$omp threadprivate(x, y, z)
48 integer :: y
49 real :: z
51 contains
52 subroutine sub
53 !$omp parallel copyin(x, y, z)
54 !$omp end parallel
55 end subroutine
56 end module