1 ! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp -fopenmp-version=50
3 ! 2.10.1 use_device_ptr clause
4 ! List item in USE_DEVICE_ADDR clause must not be structure element.
5 ! Same list item can not be present multiple times or in multipe
6 ! USE_DEVICE_ADDR clauses.
8 subroutine omp_target_data
10 integer, target
:: b(1024)
15 type(my_type
) :: my_var
18 !ERROR: A variable that is part of another variable (structure element) cannot appear on the TARGET DATA USE_DEVICE_ADDR clause
19 !$omp target data map(tofrom: a) use_device_addr(my_var%my_b)
23 !ERROR: List item 'b' present at multiple USE_DEVICE_ADDR clauses
24 !$omp target data map(tofrom: a) use_device_addr(b,b)
28 !ERROR: List item 'b' present at multiple USE_DEVICE_ADDR clauses
29 !$omp target data map(tofrom: a) use_device_addr(b) use_device_addr(b)
33 end subroutine omp_target_data