1! RUN: %S/test_errors.sh %s %t %flang -fopenmp
2! XFAIL: *
3
4! OpenMP Version 4.5
5! 2.8.1 simd Construct
6! An ordered construct with the simd clause is the only OpenMP construct
7! that can be encountered during execution of a simd region.
8
9program omp_simd
10  integer i, j, k
11  integer, allocatable :: a(:)
12
13  allocate(a(10))
14
15  !$omp simd
16  do i = 1, 10
17    !ERROR: Invalid OpenMP construct inside simd region
18    !$omp single
19    a(i) = i
20    !$omp end single
21  end do
22  !$omp end simd
23
24  print *, a
25
26end program omp_simd
27