[HLSL] Implement RWBuffer::operator[] via __builtin_hlsl_resource_getpointer (#117017)
[llvm-project.git] / flang / test / Semantics / OpenMP / do-ordered.f90
blob79ded3e1b6fe6b1a0397de869dd4256fefe50ec6
1 !RUN: %python %S/../test_errors.py %s %flang -fopenmp
2 ! OpenMP Version 4.5
3 ! 2.7.1 Ordered Clause
5 program omp_doOrdered
6 integer:: i,j
7 !ERROR: The value of the parameter in the COLLAPSE or ORDERED clause must not be larger than the number of nested loops following the construct.
8 !$omp do ordered(3)
9 do i = 1,10
10 do j = 1, 10
11 print *, "hello"
12 end do
13 end do
14 !$omp end do
16 do i = 1,10
17 do j = 1, 10
18 !ERROR: The value of the parameter in the COLLAPSE or ORDERED clause must not be larger than the number of nested loops following the construct.
19 !$omp do ordered(2)
20 do k = 1, 10
21 print *, "hello"
22 end do
23 !$omp end do
24 end do
25 end do
27 !ERROR: The value of the parameter in the COLLAPSE or ORDERED clause must not be larger than the number of nested loops following the construct.
28 !$omp do ordered(2)
29 do i = 1,10
30 !ERROR: An ORDERED directive without the DEPEND clause must be closely nested in a worksharing-loop (or worksharing-loop SIMD) region with ORDERED clause without the parameter
31 !$omp ordered
32 do j = 1, 10
33 print *, "hello"
34 end do
35 !$omp end ordered
36 end do
37 !$omp end do
39 !ERROR: The value of the parameter in the COLLAPSE or ORDERED clause must not be larger than the number of nested loops following the construct.
40 !$omp do collapse(1) ordered(3)
41 do i = 1,10
42 do j = 1, 10
43 print *, "hello"
44 end do
45 end do
46 !$omp end do
48 !$omp parallel num_threads(4)
49 !ERROR: The value of the parameter in the COLLAPSE or ORDERED clause must not be larger than the number of nested loops following the construct.
50 !$omp do ordered(2) collapse(1)
51 do i = 1,10
52 !ERROR: An ORDERED directive without the DEPEND clause must be closely nested in a worksharing-loop (or worksharing-loop SIMD) region with ORDERED clause without the parameter
53 !$omp ordered
54 do j = 1, 10
55 print *, "hello"
56 end do
57 !$omp end ordered
58 end do
59 !$omp end parallel
60 end program omp_doOrdered