1module m 2integer x, w 3end module m 4 5subroutine foo 6 use m 7 interface 8 logical function bar(i) 9 integer i 10 end function 11 end interface 12 integer y, i, z 13 logical tmp 14 y = 5 15 !$omp teams num_teams(1) firstprivate (x) shared (y) shared (w) 16 !$omp parallel do firstprivate (x, y, z, w) lastprivate (conditional: x, y, z, w) 17 do i = 1, 64 18 if (bar (i)) then 19 x = i; 20 y = i + 1; 21 z = i + 2; 22 w = i + 3; 23 end if 24 tmp = bar (y); 25 tmp = bar (z); 26 end do 27 !$omp end teams 28end 29