xref: /llvm-project/flang/test/Semantics/OpenMP/simd03.f90 (revision 879b7268b8edca42f35648c4b54e5426bf0877bb)
1! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags
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