Files
clang-p2996/flang/test/Parser/OpenMP/scope.f90
Kiran Chandramohan 843c2fbe7f Add parser+semantics support for scope construct (#113700)
Test parsing, semantics and a couple of basic semantic checks for
block/worksharing constructs.
Add TODO message in lowering.
2024-10-25 18:57:01 +01:00

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