34 lines · plain
1! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp -fopenmp-version=502! OpenMP Version 5.03! 2.10.1 use_device_ptr clause4! List item in USE_DEVICE_ADDR clause must not be structure element.5! Same list item can not be present multiple times or in multipe6! USE_DEVICE_ADDR clauses.7 8subroutine omp_target_data9 integer :: a(1024)10 integer, target :: b(1024)11 type my_type12 integer :: my_b(1024)13 end type my_type14 15 type(my_type) :: my_var16 a = 117 18 !ERROR: A variable that is part of another variable cannot appear on the USE_DEVICE_ADDR clause19 !$omp target data map(tofrom: a) use_device_addr(my_var%my_b)20 my_var%my_b = a21 !$omp end target data22 23 !ERROR: List item 'b' present at multiple USE_DEVICE_ADDR clauses24 !$omp target data map(tofrom: a) use_device_addr(b,b)25 b = a26 !$omp end target data27 28 !ERROR: List item 'b' present at multiple USE_DEVICE_ADDR clauses29 !$omp target data map(tofrom: a) use_device_addr(b) use_device_addr(b)30 b = a31 !$omp end target data32 33end subroutine omp_target_data34