gcc/testsuite/gfortran.dg/gomp/pr79154-simd.f90
raw| 1 | ! { dg-options "-fno-openmp -fopenmp-simd" } |
| 2 | ! |
| 3 | pure subroutine bar(a) |
| 4 | integer, intent(in) :: a(:) |
| 5 | !$omp target enter data map(to:a) ! Ignored with -fopenmp-simd otherwise invalid in PURE |
| 6 | end |
| 7 | |
| 8 | pure subroutine foo(a,b) |
| 9 | integer, intent(out) :: a(5) |
| 10 | integer, intent(in) :: b(5) |
| 11 | !$omp target teams distribute simd ! { dg-error "may not appear in a PURE procedure" } |
| 12 | do i=1, 5 |
| 13 | a(i) = b(i) |
| 14 | end do |
| 15 | !$omp end target teams distribute |
| 16 | end subroutine |