59 lines · plain
1! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp -fopenmp-version=512 3subroutine foo(b)4use iso_c_binding5integer :: x,y6type(C_PTR) :: b7!ERROR: Variable 'x' may not appear on both MAP and PRIVATE clauses on a TARGET construct8!$omp target map(x) private(x)9 x = x + 110!$omp end target11 12!ERROR: Variable 'y' in IS_DEVICE_PTR clause must be of type C_PTR13!$omp target map(x) is_device_ptr(y)14 x = x + 115!$omp end target16 17!ERROR: Variable 'b' may not appear on both IS_DEVICE_PTR and HAS_DEVICE_ADDR clauses on a TARGET construct18!$omp target map(x) is_device_ptr(b) has_device_addr(b)19 x = x + 120!$omp end target21 22!ERROR: Variable 'b' may not appear on both IS_DEVICE_PTR and PRIVATE clauses on a TARGET construct23!$omp target map(x) is_device_ptr(b) private(b)24 x = x + 125!$omp end target26 27!ERROR: Variable 'y' may not appear on both HAS_DEVICE_ADDR and FIRSTPRIVATE clauses on a TARGET construct28!$omp target map(x) has_device_addr(y) firstprivate(y)29 y = y - 130!$omp end target31 32end subroutine foo33 34subroutine bar(b1, b2, b3)35 use iso_c_binding36 integer :: y37 type(c_ptr) :: c38 type(c_ptr), allocatable :: b139 type(c_ptr), pointer :: b240 type(c_ptr), value :: b341 42 !WARNING: Variable 'c' in IS_DEVICE_PTR clause must be a dummy argument. This semantic check is deprecated from OpenMP 5.2 and later. [-Wopen-mp-usage]43 !$omp target is_device_ptr(c)44 y = y + 145 !$omp end target46 !WARNING: Variable 'b1' in IS_DEVICE_PTR clause must be a dummy argument that does not have the ALLOCATABLE, POINTER or VALUE attribute. This semantic check is deprecated from OpenMP 5.2 and later. [-Wopen-mp-usage]47 !$omp target is_device_ptr(b1)48 y = y + 149 !$omp end target50 !WARNING: Variable 'b2' in IS_DEVICE_PTR clause must be a dummy argument that does not have the ALLOCATABLE, POINTER or VALUE attribute. This semantic check is deprecated from OpenMP 5.2 and later. [-Wopen-mp-usage]51 !$omp target is_device_ptr(b2)52 y = y + 153 !$omp end target54 !WARNING: Variable 'b3' in IS_DEVICE_PTR clause must be a dummy argument that does not have the ALLOCATABLE, POINTER or VALUE attribute. This semantic check is deprecated from OpenMP 5.2 and later. [-Wopen-mp-usage]55 !$omp target is_device_ptr(b3)56 y = y + 157 !$omp end target58end subroutine bar59