Debian Codegraph @

gcc/testsuite/gfortran.dg/gomp/pure-4.f90

raw
1 pure subroutine sub1
2 implicit none
3 integer :: i
4 !$omp target do ! { dg-error "OpenMP directive at .1. is not pure and thus may not appear in a PURE procedure" }
5 do i = 1, 5
6 end do
7 !$omp end target ! { dg-error "OpenMP directive at .1. is not pure and thus may not appear in a PURE procedure" }
8 end
9
10 subroutine sub2
11 implicit none
12 integer :: i
13 !$omp target simd ! OK - not pure
14 do i = 1, 5
15 end do
16 !$omp end target simd
17 end
18
19 pure subroutine sub3
20 implicit none
21 integer :: i
22 !$omp target simd ! { dg-error "OpenMP directive at .1. is not pure and thus may not appear in a PURE procedure" }
23 do i = 1, 5
24 end do
25 !$omp end target simd ! { dg-error "OpenMP directive at .1. is not pure and thus may not appear in a PURE procedure" }
26 end
27
28 pure subroutine sub4
29 implicit none
30 integer :: i
31 !$omp do ! { dg-error "OpenMP directive at .1. is not pure and thus may not appear in a PURE procedure" }
32 do i = 1, 5
33 end do
34 !$omp end do ! { dg-error "OpenMP directive at .1. is not pure and thus may not appear in a PURE procedure" }
35 end