2 ! Fortran version of libgomp.c-c++-common/lastprivate-conditional-10.c
9 integer function foo (a)
10 integer, contiguous :: a(0:)
13 !$omp parallel do simd lastprivate (conditional: x) schedule(simd : static) if (simd : .false.)
15 if (a(i) /= 0) x = a(i)
20 integer function bar (a, b)
21 integer, contiguous :: a(0:), b(0:)
24 !$omp do simd lastprivate (conditional: x, v) schedule(static, 16) simdlen (1)
26 if (a(i) /= 0) x = a(i);
27 if (b(i) /= 0) v = b(i) + 10;
33 integer function baz (a)
34 integer, contiguous :: a(0:)
36 !$omp parallel do simd if (simd : .false.) lastprivate (conditional: x) schedule(simd : dynamic, 16)
38 if (a(i) /= 0) x = a(i) + 5
47 integer :: a(0:127), b(0:127), i
49 if (mod(i, 11) == 2) then
54 if (mod(i, 13) == 5) then
60 if (foo (a) /= 133) stop 1
61 if (bar (b, a) /= 244 .or. v /= 143) stop 2
62 if (baz (b) /= 249) stop 3