55 lines · plain
1! RUN: %flang_fc1 -fdebug-pre-fir-tree -fopenmp %s | FileCheck %s2 3! Test structure of the Pre-FIR tree with OpenMP declarative construct4 5! CHECK: Module m6module m7 real, dimension(10) :: x8 ! CHECK-NEXT: OpenMPDeclarativeConstruct9 !$omp threadprivate(x)10end11! CHECK: End Module m12 13! CHECK: Module m214module m215 integer, save :: i16 ! CHECK-NEXT: OpenMPDeclarativeConstruct17 !$omp threadprivate(i)18contains19 subroutine sub()20 i = 1;21 end22 subroutine sub2()23 i = 2;24 end25end26! CHECK: End Module m227 28! CHECK: Program MAIN29program main30 real :: y31 ! CHECK-NEXT: OpenMPDeclarativeConstruct32 !$omp threadprivate(y)33end34! CHECK: End Program MAIN35 36! CHECK: Subroutine sub137subroutine sub1()38 real, save :: p39 ! CHECK-NEXT: OpenMPDeclarativeConstruct40 !$omp threadprivate(p)41end42! CHECK: End Subroutine sub143 44! CHECK: Subroutine sub245subroutine sub2()46 real, save :: q47 ! CHECK-NEXT: OpenMPDeclarativeConstruct48 !$omp threadprivate(q)49contains50 subroutine sub()51 end52end53! CHECK: End Subroutine sub254 55