2 ! { dg-options "-ffree-line-length-160" }
6 subroutine foo (a
, b
, c
, d
, e
, f
, g
, n
, q
)
8 integer :: a
, b(3:n
), c(5:), d(2:*), e(:,:)
9 integer, pointer :: f
, g(:)
11 integer, pointer :: j
, k(:)
18 !$omp target map (to: a, b, c, d(2:n+1), e, f, g, h, i, j, k, n) map (from: r)
20 r
= r
.or
. (any (b
/= 8)) .or
. (lbound (b
, 1) /= 3) .or
. (ubound (b
, 1) /= n
)
21 r
= r
.or
. (any (c
/= 9)) .or
. (lbound (c
, 1) /= 5) .or
. (ubound (c
, 1) /= n
+ 4)
22 r
= r
.or
. (any (d(2:n
+1) /= 10)) .or
. (lbound (d
, 1) /= 2)
23 r
= r
.or
. (any (e
/= 11)) .or
. (lbound (e
, 1) /= 1) .or
. (ubound (e
, 1) /= 2)
24 r
= r
.or
. (lbound (e
, 2) /= 1) .or
. (ubound (e
, 2) /= 2)
26 r
= r
.or
. (any (g
/= 13)) .or
. (lbound (g
, 1) /= 3) .or
. (ubound (g
, 1) /= n
)
28 r
= r
.or
. (any (i
/= 15)) .or
. (lbound (i
, 1) /= 3) .or
. (ubound (i
, 1) /= n
)
30 r
= r
.or
. (any (k
/= 17)) .or
. (lbound (k
, 1) /= 4) .or
. (ubound (k
, 1) /= n
)
33 !$omp target map (to: b(3:n), c(5:n+4), d(2:n+1), e(1:,:2), g(3:n), i(3:n), k(4:n), n) map (from: r)
34 r
= (any (b
/= 8)) .or
. (lbound (b
, 1) /= 3) .or
. (ubound (b
, 1) /= n
)
35 r
= r
.or
. (any (c
/= 9)) .or
. (lbound (c
, 1) /= 5) .or
. (ubound (c
, 1) /= n
+ 4)
36 r
= r
.or
. (any (d(2:n
+1) /= 10)) .or
. (lbound (d
, 1) /= 2)
37 r
= r
.or
. (any (e
/= 11)) .or
. (lbound (e
, 1) /= 1) .or
. (ubound (e
, 1) /= 2)
38 r
= r
.or
. (lbound (e
, 2) /= 1) .or
. (ubound (e
, 2) /= 2)
39 r
= r
.or
. (any (g
/= 13)) .or
. (lbound (g
, 1) /= 3) .or
. (ubound (g
, 1) /= n
)
40 r
= r
.or
. (any (i
/= 15)) .or
. (lbound (i
, 1) /= 3) .or
. (ubound (i
, 1) /= n
)
41 r
= r
.or
. (any (k
/= 17)) .or
. (lbound (k
, 1) /= 4) .or
. (ubound (k
, 1) /= n
)
44 !$omp target map (to: b(5:n-2), c(7:n), d(4:n-2), e(1:,2:), g(5:n-3), i(6:n-4), k(5:n-5), n) map (from: r)
45 r
= (any (b(5:n
-2) /= 8)) .or
. (lbound (b
, 1) /= 3) .or
. (ubound (b
, 1) /= n
)
46 r
= r
.or
. (any (c(7:n
) /= 9)) .or
. (lbound (c
, 1) /= 5) .or
. (ubound (c
, 1) /= n
+ 4)
47 r
= r
.or
. (any (d(4:n
-2) /= 10)) .or
. (lbound (d
, 1) /= 2)
48 r
= r
.or
. (any (e(1:,2:) /= 11)) .or
. (lbound (e
, 1) /= 1) .or
. (ubound (e
, 1) /= 2)
49 r
= r
.or
. (lbound (e
, 2) /= 1) .or
. (ubound (e
, 2) /= 2)
50 r
= r
.or
. (any (g(5:n
-3) /= 13)) .or
. (lbound (g
, 1) /= 3) .or
. (ubound (g
, 1) /= n
)
51 r
= r
.or
. (any (i(6:n
-4) /= 15)) .or
. (lbound (i
, 1) /= 3) .or
. (ubound (i
, 1) /= n
)
52 r
= r
.or
. (any (k(5:n
-5) /= 17)) .or
. (lbound (k
, 1) /= 4) .or
. (ubound (k
, 1) /= n
)
54 !$omp target map (to: b(q+5:n-2+q), c(q+7:q+n), d(q+4:q+n-2), e(1:q+2,2:q+2), g(5+q:n-3+q), &
55 !$omp & i(6+q:n-4+q), k(5+q:n-5+q), n) map (from: r)
56 r
= (any (b(5:n
-2) /= 8)) .or
. (lbound (b
, 1) /= 3) .or
. (ubound (b
, 1) /= n
)
57 r
= r
.or
. (any (c(7:n
) /= 9)) .or
. (lbound (c
, 1) /= 5) .or
. (ubound (c
, 1) /= n
+ 4)
58 r
= r
.or
. (any (d(4:n
-2) /= 10)) .or
. (lbound (d
, 1) /= 2)
59 r
= r
.or
. (any (e(1:,2:) /= 11)) .or
. (lbound (e
, 1) /= 1) .or
. (ubound (e
, 1) /= 2)
60 r
= r
.or
. (lbound (e
, 2) /= 1) .or
. (ubound (e
, 2) /= 2)
61 r
= r
.or
. (any (g(5:n
-3) /= 13)) .or
. (lbound (g
, 1) /= 3) .or
. (ubound (g
, 1) /= n
)
62 r
= r
.or
. (any (i(6:n
-4) /= 15)) .or
. (lbound (i
, 1) /= 3) .or
. (ubound (i
, 1) /= n
)
63 r
= r
.or
. (any (k(5:n
-5) /= 17)) .or
. (lbound (k
, 1) /= 4) .or
. (ubound (k
, 1) /= n
)
66 !$omp target map (to: d(2:n+1), n)
68 r
= r
.or
. (any (b
/= 8)) .or
. (lbound (b
, 1) /= 3) .or
. (ubound (b
, 1) /= n
)
69 r
= r
.or
. (any (c
/= 9)) .or
. (lbound (c
, 1) /= 5) .or
. (ubound (c
, 1) /= n
+ 4)
70 r
= r
.or
. (any (d(2:n
+1) /= 10)) .or
. (lbound (d
, 1) /= 2)
71 r
= r
.or
. (any (e
/= 11)) .or
. (lbound (e
, 1) /= 1) .or
. (ubound (e
, 1) /= 2)
72 r
= r
.or
. (lbound (e
, 2) /= 1) .or
. (ubound (e
, 2) /= 2)
74 r
= r
.or
. (any (g
/= 13)) .or
. (lbound (g
, 1) /= 3) .or
. (ubound (g
, 1) /= n
)
76 r
= r
.or
. (any (i
/= 15)) .or
. (lbound (i
, 1) /= 3) .or
. (ubound (i
, 1) /= n
)
78 r
= r
.or
. (any (k
/= 17)) .or
. (lbound (k
, 1) /= 4) .or
. (ubound (k
, 1) /= n
)
83 use target2
, only
: foo
84 integer, parameter :: n
= 15, q
= 0
85 integer :: a
, b(2:n
-1), c(n
), d(n
), e(3:4, 3:4)
86 integer, pointer :: f
, g(:)
95 call foo (a
, b
, c
, d
, e
, f
, g
, n
, q
)