Files
clang-p2996/flang/test/Examples/omp-order-clause.f90
Kavitha Natarajan a7d352c76d [flang][OpenMP] Add parser support for order clause
Added parser support for OpenMP 5.0 & 5.1 feature
ORDER([order-modifier :]concurrent) clause for all
applicable and supported OpenMP directives.

Reviewed By: kiranchandramohan, abidmalikwaterloo

Differential Revision: https://reviews.llvm.org/D142524
2023-02-21 19:31:19 +05:30

54 lines
1.3 KiB
Fortran

! REQUIRES: plugins, examples, shell
! RUN: %flang_fc1 -load %llvmshlibdir/flangOmpReport.so -plugin flang-omp-report -fopenmp %s -o - | FileCheck %s
! Check for ORDER([order-modifier :]concurrent) clause on OpenMP constructs
subroutine test_order()
integer :: i, j = 1
!$omp do order(concurrent)
do i=1,10
j = j + 1
end do
!$omp end do
end subroutine
!CHECK: - file: {{.*}}
!CHECK: line: 9
!CHECK: construct: do
!CHECK: clauses:
!CHECK: - clause: order
!CHECK: details: concurrent
subroutine test_order_reproducible()
integer :: i, j = 1
!$omp simd order(reproducible:concurrent)
do i=1,10
j = j + 1
end do
!$omp end simd
end subroutine
!CHECK: - file: {{.*}}
!CHECK: line: 25
!CHECK: construct: simd
!CHECK: clauses:
!CHECK: - clause: order
!CHECK: details: 'reproducible:concurrent'
subroutine test_order_unconstrained()
integer :: i, j = 1
!$omp target teams distribute parallel do simd order(unconstrained:concurrent)
do i=1,10
j = j + 1
end do
!$omp end target teams distribute parallel do simd
end subroutine
!CHECK: - file: {{.*}}
!CHECK: line: 41
!CHECK: construct: target teams distribute parallel do simd
!CHECK: clauses:
!CHECK: - clause: order
!CHECK: details: 'unconstrained:concurrent'