Test parsing, semantics and a couple of basic semantic checks for block/worksharing constructs. Add TODO message in lowering.
25 lines
982 B
Fortran
25 lines
982 B
Fortran
! RUN: %flang_fc1 -fdebug-unparse -fopenmp -fopenmp-version=51 %s | FileCheck --ignore-case %s
|
|
! RUN: %flang_fc1 -fdebug-dump-parse-tree -fopenmp -fopenmp-version=51 %s | FileCheck --check-prefix="PARSE-TREE" %s
|
|
|
|
program omp_scope
|
|
integer i
|
|
i = 10
|
|
|
|
!CHECK: !$OMP SCOPE PRIVATE(i)
|
|
!CHECK: !$OMP END SCOPE
|
|
|
|
!PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OpenMPBlockConstruct
|
|
!PARSE-TREE: OmpBeginBlockDirective
|
|
!PARSE-TREE: OmpBlockDirective -> llvm::omp::Directive = scope
|
|
!PARSE-TREE: OmpClauseList -> OmpClause -> Private -> OmpObjectList -> OmpObject -> Designator -> DataRef -> Name = 'i'
|
|
!PARSE-TREE: Block
|
|
!PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> ActionStmt -> PrintStmt
|
|
!PARSE-TREE: OmpEndBlockDirective
|
|
!PARSE-TREE: OmpBlockDirective -> llvm::omp::Directive = scope
|
|
!PARSE-TREE: OmpClauseList -> OmpClause -> Nowait
|
|
|
|
!$omp scope private(i)
|
|
print *, "omp scope", i
|
|
!$omp end scope nowait
|
|
end program omp_scope
|