| 1 |
! { dg-options "-fno-openmp -fopenmp-simd" } |
| 2 |
|
| 3 |
! Invalid combined directives with SIMD in PURE |
| 4 |
|
| 5 |
pure subroutine sub1 |
| 6 |
implicit none |
| 7 |
integer :: i |
| 8 |
!$omp target do ! OK - not parsed by -fopenmp-simd |
| 9 |
do i = 1, 5 |
| 10 |
end do |
| 11 |
!$omp end target |
| 12 |
end |
| 13 |
|
| 14 |
subroutine sub2 |
| 15 |
implicit none |
| 16 |
integer :: i |
| 17 |
!$omp target simd ! OK - not pure |
| 18 |
do i = 1, 5 |
| 19 |
end do |
| 20 |
!$omp end target simd |
| 21 |
end |
| 22 |
|
| 23 |
pure subroutine sub3 |
| 24 |
implicit none |
| 25 |
integer :: i |
| 26 |
!$omp target simd ! { dg-error "OpenMP directive at .1. is not pure and thus may not appear in a PURE procedure" } |
| 27 |
do i = 1, 5 |
| 28 |
end do |
| 29 |
!$omp end target simd ! { dg-error "OpenMP directive at .1. is not pure and thus may not appear in a PURE procedure" } |
| 30 |
end |
| 31 |
|