OpenMPBlockConstruct, somewhat confusingly, represents most but not all block-associated constructs. It's derived from OmpBlockConstruct, as are all the remaining block-associated constructs. It does not correspond to any well-defined group of constructs. It's the collection of constructs that don't have their own types (and those that do have their own types do so for their own reasons). Using the broader OmpBlockConstruct in type-based visitors won't cause issues, because the specific overloads (for classes derived from it) will always be preferred.
15 lines
629 B
Fortran
15 lines
629 B
Fortran
! RUN: %flang_fc1 -fdebug-unparse -fopenmp %s | FileCheck --ignore-case %s
|
|
! RUN: %flang_fc1 -fdebug-dump-parse-tree -fopenmp %s | FileCheck --check-prefix="PARSE-TREE" %s
|
|
|
|
! CHECK: !$OMP PARALLEL PROC_BIND(PRIMARY)
|
|
|
|
! PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OmpBlockConstruct
|
|
! PARSE-TREE: OmpBeginDirective
|
|
! PARSE-TREE: OmpDirectiveName -> llvm::omp::Directive = parallel
|
|
! PARSE-TREE: OmpClauseList -> OmpClause -> ProcBind -> OmpProcBindClause -> AffinityPolicy = Primary
|
|
subroutine sb1
|
|
!$omp parallel proc_bind(primary)
|
|
print *, "Hello"
|
|
!$omp end parallel
|
|
end subroutine
|