brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · 7b20a87 Raw
92 lines · plain
1! RUN: %flang_fc1 -fdebug-pre-fir-tree -fopenmp %s | FileCheck %s2 3subroutine openmp_sections(x, y)4 5  integer, intent(inout)::x, y6 7!==============================================================================8! empty construct9!==============================================================================10!$omp sections11!$omp end sections12 13!CHECK: OpenMPConstruct14!CHECK: End OpenMPConstruct15 16!==============================================================================17! single section, without `!$omp section`18!==============================================================================19!$omp sections20    call F1()21!$omp end sections22 23!CHECK: OpenMPConstruct24!CHECK:  OpenMPConstruct25!CHECK:   CallStmt26!CHECK:  End OpenMPConstruct27!CHECK: End OpenMPConstruct28 29!==============================================================================30! single section with `!$omp section`31!==============================================================================32!$omp sections33  !$omp section34    call F135!$omp end sections36 37!CHECK: OpenMPConstruct38!CHECK:  OpenMPConstruct39!CHECK:   CallStmt40!CHECK:  End OpenMPConstruct41!CHECK: End OpenMPConstruct42 43!==============================================================================44! multiple sections45!==============================================================================46!$omp sections47  !$omp section48    call F149  !$omp section50    call F251  !$omp section52    call F353!$omp end sections54 55!CHECK: OpenMPConstruct56!CHECK:  OpenMPConstruct57!CHECK:   CallStmt58!CHECK:  End OpenMPConstruct59!CHECK:  OpenMPConstruct60!CHECK:   CallStmt61!CHECK:  End OpenMPConstruct62!CHECK:  OpenMPConstruct63!CHECK:   CallStmt64!CHECK:  End OpenMPConstruct65!CHECK: End OpenMPConstruct66 67!==============================================================================68! multiple sections with clauses69!==============================================================================70!$omp sections PRIVATE(x) FIRSTPRIVATE(y)71  !$omp section72    call F173  !$omp section74    call F275  !$omp section76    call F377!$omp end sections NOWAIT78 79!CHECK: OpenMPConstruct80!CHECK:  OpenMPConstruct81!CHECK:   CallStmt82!CHECK:  End OpenMPConstruct83!CHECK:  OpenMPConstruct84!CHECK:   CallStmt85!CHECK:  End OpenMPConstruct86!CHECK:  OpenMPConstruct87!CHECK:   CallStmt88!CHECK:  End OpenMPConstruct89!CHECK: End OpenMPConstruct90 91end subroutine openmp_sections92