1 ! RUN: %python %S/../test_errors.py %s %flang -fopenmp
3 ! Check OpenMP construct validity for the following directives:
4 ! 2.19.9 Ordered Construct
8 real :: a
, arrayA(10), arrayB(10), arrayC(10)
9 real, external :: foo
, bar
, baz
13 !ERROR: At most one THREADS clause can appear on the ORDERED directive
14 !$omp ordered threads threads
22 !ERROR: At most one SIMD clause can appear on the ORDERED directive
23 !$omp ordered simd simd
31 !ERROR: At most one SIMD clause can appear on the ORDERED directive
32 !$omp ordered simd simd
40 !ERROR: Only SINK or SOURCE dependence types are allowed when ORDERED construct is a standalone construct with no ORDERED region
41 !ERROR: At most one SOURCE dependence type can appear on the ORDERED directive
42 !$omp ordered depend(source) depend(inout: arrayA) depend(source)
44 !ERROR: The SINK and SOURCE dependence types are mutually exclusive
45 !ERROR: At most one SOURCE dependence type can appear on the ORDERED directive
46 !$omp ordered depend(sink: i - 1) depend(source) depend(source)
47 arrayB(i
) = bar(arrayA(i
), arrayB(i
-1))
48 !ERROR: Only SINK or SOURCE dependence types are allowed when ORDERED construct is a standalone construct with no ORDERED region
49 !ERROR: Only SINK or SOURCE dependence types are allowed when ORDERED construct is a standalone construct with no ORDERED region
50 !$omp ordered depend(out: arrayC) depend(in: arrayB)
51 arrayC(i
) = baz(arrayB(i
-1))
57 !ERROR: DEPEND clauses are not allowed when ORDERED construct is a block construct with an ORDERED region
58 !$omp ordered depend(source)
61 !ERROR: DEPEND clauses are not allowed when ORDERED construct is a block construct with an ORDERED region
62 !$omp ordered depend(sink: i - 1)
63 arrayB(i
) = bar(arrayA(i
), arrayB(i
-1))
70 !ERROR: THREADS and SIMD clauses are not allowed when ORDERED construct is a standalone construct with no ORDERED region
75 !ERROR: THREADS and SIMD clauses are not allowed when ORDERED construct is a standalone construct with no ORDERED region