57 lines · plain
1! RUN: %flang -fsyntax-only -fopenmp %s 2>&12 3! Check that OpenMP declarative directives can be used with objects that have4! an incomplete type.5 6subroutine test_decl7 ! OMPv5.2 5.2 threadprivate8 ! OMPv5.2 6.5 allocate9 implicit none10 save :: x1, y111 !$omp threadprivate(x1)12 !$omp allocate(y1) allocator(0)13 integer :: x1, y114 15 ! OMPv5.2 7.7 declare-simd16 external :: simd_func17 !$omp declare simd(simd_func)18 logical :: simd_func19 20 ! OMPv5.2 7.8.1 declare-target21 allocatable :: j22 !$omp declare target(j)23 save :: j24 real(kind=8) :: j(:)25 26 ! OMPv5.2 5.5.11 declare-reduction - crashes27 !external :: my_add_red28 !!$omp declare reduction(my_add_red : integer : my_add_red(omp_out, omp_in)) &29 !!$omp& initializer(omp_priv=0)30 !integer :: my_add_red31end subroutine32 33subroutine test_decl234 save x1, y135 !$omp threadprivate(x1)36 !$omp allocate(y1) allocator(0)37 integer :: x1, y138 39 ! implicit decl40 !$omp threadprivate(x2)41 !$omp allocate(y2) allocator(0)42 save x2, y243end subroutine44 45module m146 ! implicit decl47 !$omp threadprivate(x, y, z)48 integer :: y49 real :: z50 51contains52 subroutine sub53 !$omp parallel copyin(x, y, z)54 !$omp end parallel55 end subroutine56end module57