50 lines · plain
1!RUN: %python %S/../test_errors.py %s %flang -fopenmp -fopenmp-version=61 -Werror2 3subroutine f00(x)4 integer, pointer :: x5 !ERROR: 'attach-modifier' modifier cannot occur multiple times6 !$omp target map(attach(always), attach(never): x)7 !$omp end target8end9 10subroutine f01(x)11 integer, pointer :: x12 !ERROR: The 'attach-modifier' modifier can only appear on a map-entering construct or on a DECLARE_MAPPER directive13 !$omp target_exit_data map(attach(always): x)14end15 16subroutine f02(x)17 integer, pointer :: x18 !ERROR: The 'attach-modifier' modifier can only appear on a map-entering construct or on a DECLARE_MAPPER directive19 !$omp target map(attach(never), from: x)20 !$omp end target21end22 23subroutine f03(x)24 integer :: x25 !ERROR: A list-item that appears in a map clause with the ATTACH modifier must have a base-pointer26 !$omp target map(attach(always), tofrom: x)27 !$omp end target28end29 30module m31type t32 integer :: z33end type34 35type u36 type(t), pointer :: y37end type38 39contains40 41subroutine f04(n)42 integer :: n43 type(u) :: x(10)44 45 !Expect no diagonstics46 !$omp target map(attach(always), to: x(n)%y%z)47 !$omp end target48end49end module50