1 ! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp -Werror -pedantic
4 ! Check OpenMP construct validity for the following directives:
5 ! 2.12.5 Target Construct
8 integer :: i
, j
, N
= 10, n1
, n2
, res(100)
9 real :: a
, arrayA(512), arrayB(512), ai(10)
10 real, allocatable
:: B(:)
13 !PORTABILITY: If TARGET UPDATE directive is nested inside TARGET region, the behaviour is unspecified
14 !$omp target update from(arrayA) to(arrayB)
23 !PORTABILITY: If TARGET UPDATE directive is nested inside TARGET region, the behaviour is unspecified
24 !$omp target update from(arrayA) to(arrayB)
33 !PORTABILITY: If TARGET DATA directive is nested inside TARGET region, the behaviour is unspecified
34 !$omp target data map(to: a)
43 !PORTABILITY: If TARGET ENTER DATA directive is nested inside TARGET region, the behaviour is unspecified
44 !$omp target enter data map(alloc:B)
48 !PORTABILITY: If TARGET EXIT DATA directive is nested inside TARGET region, the behaviour is unspecified
49 !$omp target exit data map(delete:B)
55 !$omp target teams map(to:a)
56 !PORTABILITY: If TARGET DATA directive is nested inside TARGET region, the behaviour is unspecified
57 !$omp target data map(n1,n2)
64 !$omp end target teams
66 !$omp target teams map(to:a) map(from:n1,n2)
67 !PORTABILITY: If TARGET TEAMS DISTRIBUTE PARALLEL DO directive is nested inside TARGET region, the behaviour is unspecified
68 !$omp target teams distribute parallel do
74 !$omp end target teams distribute parallel do
75 !$omp end target teams