brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · f5aa4d7 Raw
42 lines · plain
1! RUN: %python %S/../test_errors.py %s %flang -fopenacc2 3! Check OpenACC clause validity for the following construct and directive:4!   2.8 host_data5 6program openacc_host_data_validity7 8  implicit none9 10  integer, parameter :: N = 25611  real(8), dimension(N, N) :: aa, bb12  logical :: ifCondition = .TRUE.13 14  !ERROR: At least one of USE_DEVICE clause must appear on the HOST_DATA directive15  !$acc host_data16  !$acc end host_data17 18  !$acc host_data use_device(aa)19  !$acc end host_data20 21  !$acc host_data use_device(aa) if(.true.)22  !$acc end host_data23 24  !$acc host_data use_device(aa) if(ifCondition)25  !$acc end host_data26 27  !$acc host_data use_device(aa, bb) if_present28  !$acc end host_data29 30  ! OK31  !$acc host_data use_device(aa, bb) if_present if_present32  !$acc end host_data33 34  !$acc host_data use_device(aa, bb) if(.true.) if_present35  !$acc end host_data36 37  !ERROR: At most one IF clause can appear on the HOST_DATA directive38  !$acc host_data use_device(aa, bb) if(.true.) if(ifCondition)39  !$acc end host_data40 41end program openacc_host_data_validity42