3 ! { dg-additional-options "-msse2" { target sse2_runtime } }
4 ! { dg-additional-options "-mavx" { target avx_runtime } }
6 integer, save :: u(1024), v(1024), w(1024), m
8 v
= (/ (i
, i
= 1, 1024) /)
9 w
= (/ (i
+ 1, i
= 1, 1024) /)
16 if (u(i
) .ne
. 2 * i
+ 1) STOP 1
26 if (i
.lt
. 2 .or
. i
.gt
. 1022) then
27 if (u(i
) .ne
. 2 * i
+ 1) STOP 2
29 if (u(i
) .ne
. 1536 - 2 * i
) STOP 3
34 if (m
.ne
. (1023 + 2 * (1021 * 5 + 17) + 9)) STOP 4
41 if (u(i
) .ne
. 2 * i
+ 1) STOP 5
45 if (m
.ne
. 1025) STOP 6
48 call f4 (0, 31, 1, 32)
52 if (u(i
) .ne
. 1536 - 2 * i
) STOP 7
56 if (m
.ne
. 32 + 33 + 1024) STOP 8
59 call f5 (0, 31, 1, 32)
63 if (u(i
) .ne
. 2 * i
+ 1) STOP 9
65 if (m
.ne
. 32 + 33) STOP 10
68 integer, intent(in
) :: a
, b
70 !$omp taskloop simd default(none) shared(u, v, w) nogroup
74 ! d is predetermined linear, so we can't let the tasks continue past
75 ! end of this function.
78 subroutine f2 (a
, b
, cx
)
79 integer, intent(in
) :: a
, b
, cx
82 !$omp taskloop simd default(none) shared(u, v, w) linear(d:1) linear(c:5) lastprivate(e)
88 !$omp end taskloop simd
92 integer, intent(in
) :: a
, b
95 !$omp taskloop simd default(none) shared(u, v, w) private (p)
103 subroutine f4 (a
, b
, c
, d
)
104 integer, intent(in
) :: a
, b
, c
, d
105 integer, target
:: e
, f
106 integer, pointer :: p
, q
108 !$omp taskloop simd default(none) shared(u, v, w) lastprivate(g) collapse(2) private (r, p, q)
122 subroutine f5 (a
, b
, c
, d
)
123 integer, intent(in
) :: a
, b
, c
, d
125 !$omp taskloop simd default(none) shared(u, v, w) collapse(2) private (r)