d: Add language reference section to documentation files.
[official-gcc.git] / libgomp / testsuite / libgomp.fortran / target3.f90
blobd9b9ccf63bed0ff6ac9dc1c8ddd2795298f9983e
1 ! { dg-do run }
3 module target3
4 contains
5 subroutine foo (f, g)
6 integer :: n
7 integer, pointer :: f, g(:)
8 integer, pointer :: j, k(:)
9 logical :: r
10 nullify (j)
11 k => null ()
12 !$omp target map (tofrom: f, g, j, k) map (from: r)
13 r = associated (f) .or. associated (g)
14 r = r .or. associated (j) .or. associated (k)
15 !$omp end target
16 if (r) stop 1
17 !$omp target
18 r = associated (f) .or. associated (g)
19 r = r .or. associated (j) .or. associated (k)
20 !$omp end target
21 if (r) stop 2
22 end subroutine foo
23 end module target3
24 use target3, only : foo
25 integer, pointer :: f, g(:)
26 f => null ()
27 nullify (g)
28 call foo (f, g)
29 end