| 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 |
|
| 9 |
program 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 |
|
| 26 |
end program omp_simd |