summaryrefslogtreecommitdiff
path: root/flang/test/Parser/OpenMP/threadprivate.f90
blob: 69b281f8483759534a2b2950f78bc4936a5367c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
!RUN: %flang_fc1 -fdebug-unparse -fopenmp -fopenmp-version=60 %s | FileCheck --ignore-case --check-prefix="UNPARSE" %s
!RUN: %flang_fc1 -fdebug-dump-parse-tree -fopenmp -fopenmp-version=60 %s | FileCheck --check-prefix="PARSE-TREE" %s

module m
implicit none
integer :: a, b
common /blk/ a

!$omp threadprivate(/blk/, b)

end module

!UNPARSE: MODULE m
!UNPARSE:  IMPLICIT NONE
!UNPARSE:  INTEGER a, b
!UNPARSE:  COMMON /blk/a
!UNPARSE: !$OMP THREADPRIVATE(/blk/, b)
!UNPARSE: END MODULE

!PARSE-TREE: DeclarationConstruct -> SpecificationConstruct -> OpenMPDeclarativeConstruct -> OpenMPThreadprivate -> OmpDirectiveSpecification
!PARSE-TREE: | OmpDirectiveName -> llvm::omp::Directive = threadprivate
!PARSE-TREE: | OmpArgumentList -> OmpArgument -> OmpLocator -> OmpObject -> Name = 'blk'
!PARSE-TREE: | OmpArgument -> OmpLocator -> OmpObject -> Designator -> DataRef -> Name = 'b'
!PARSE-TREE: | OmpClauseList ->
!PARSE-TREE: | Flags = None