Files
clang-p2996/flang/test/Lower/OpenMP/ordered-threads.f90
Kiran Chandramohan 6d30d9458a [Flang][OpenMP] NFC: Port three tests with minimal changes to HLFIR flow
These are modified versions of tests from flang/test/Lower/OpenMP/FIR.
2023-10-05 16:18:21 +00:00

26 lines
563 B
Fortran

! This test checks lowering of OpenMP ordered directive with threads Clause.
! Without clause in ordered direcitve, it behaves as if threads clause is
! specified.
!RUN: %flang_fc1 -emit-hlfir -fopenmp %s -o - | FileCheck %s
subroutine ordered
integer :: i
integer :: a(20)
!CHECK: omp.ordered_region {
!$OMP ORDERED
a(i) = a(i-1) + 1
!CHECK: omp.terminator
!CHECK-NEXT: }
!$OMP END ORDERED
!CHECK: omp.ordered_region {
!$OMP ORDERED THREADS
a(i) = a(i-1) + 1
!CHECK: omp.terminator
!CHECK-NEXT: }
!$OMP END ORDERED
end