2 ! { dg-additional-options "-msse2" { target sse2_runtime } }
3 ! { dg-additional-options "-mavx" { target avx_runtime } }
5 integer, save :: u(1024), v(1024), w(1024), m
7 v
= (/ (i
, i
= 1, 1024) /)
8 w
= (/ (i
+ 1, i
= 1, 1024) /)
15 if (u(i
) .ne
. 2 * i
+ 1) stop 1
25 if (i
.lt
. 2 .or
. i
.gt
. 1022) then
26 if (u(i
) .ne
. 2 * i
+ 1) stop 2
28 if (u(i
) .ne
. 1536 - 2 * i
) stop 3
33 if (m
.ne
. (1023 + 2 * (1021 * 5 + 17) + 9)) stop 4
40 if (u(i
) .ne
. 2 * i
+ 1) stop 5
44 if (m
.ne
. 1025) stop 6
47 call f4 (0, 31, 1, 32)
51 if (u(i
) .ne
. 1536 - 2 * i
) stop 7
55 if (m
.ne
. 32 + 33 + 1024) stop 8
58 call f5 (0, 31, 1, 32)
62 if (u(i
) .ne
. 2 * i
+ 1) stop 9
64 if (m
.ne
. 32 + 33) stop 10
67 integer, intent(in
) :: a
, b
69 !$omp taskloop simd default(none) shared(u, v, w) nogroup
73 ! d is predetermined linear, so we can't let the tasks continue past
74 ! end of this function.
77 subroutine f2 (a
, b
, cx
)
78 integer, intent(in
) :: a
, b
, cx
81 !$omp taskloop simd default(none) shared(u, v, w) linear(d:1) linear(c:5) lastprivate(e)
87 !$omp end taskloop simd
91 integer, intent(in
) :: a
, b
94 !$omp taskloop simd default(none) shared(u, v, w) private (p)
102 subroutine f4 (a
, b
, c
, d
)
103 integer, intent(in
) :: a
, b
, c
, d
104 integer, target
:: e
, f
105 integer, pointer :: p
, q
107 !$omp taskloop simd default(none) shared(u, v, w) lastprivate(g) collapse(2) private (r, p, q)
121 subroutine f5 (a
, b
, c
, d
)
122 integer, intent(in
) :: a
, b
, c
, d
124 !$omp taskloop simd default(none) shared(u, v, w) collapse(2) private (r)