6 integer, parameter :: N
= 100
7 integer :: x(N
), y(N
), z(N
)
11 subroutine f (x
, y
, z
)
12 integer :: x(N
), y(N
), z(N
)
14 !$omp target map (to: x, y) map(from: z) ! { dg-error "OMP TARGET region at .1. with a nested TEAMS at .2. may not contain any other statement, declaration or directive outside of the single TEAMS construct" }
17 !$omp& when(device={arch("nvptx")}: teams loop) &
18 !$omp& default(parallel loop) ! { dg-error "\\(1\\)" }
19 ! FIXME: The line above should be the same error as above but some fails here with -fno-diagnostics-show-caret
20 ! Seems as if some gcc/testsuite/ fix is missing for libgomp/testsuite
24 z(N
) = z(N
) + 1 ! <<< invalid
28 subroutine f2 (x
, y
, z
)
29 integer :: x(N
), y(N
), z(N
)
31 !$omp target map (to: x, y) map(from: z) ! { dg-error "OMP TARGET region at .1. with a nested TEAMS may not contain any other statement, declaration or directive outside of the single TEAMS construct" }
33 integer :: i
! << invalid
35 !$omp& when(device={arch("nvptx")}: teams loop) &
36 !$omp& default(parallel loop)
42 subroutine g (x
, y
, z
)
43 integer :: x(N
), y(N
), z(N
)
45 !$omp target map (to: x, y) map(from: z) ! { dg-error "OMP TARGET region at .1. with a nested TEAMS may not contain any other statement, declaration or directive outside of the single TEAMS construct" }
47 !$omp metadirective & ! <<<< invalid
48 !$omp& when(device={arch("nvptx")}: flush) &
49 !$omp& default(nothing)