1 ! RUN: %python %S/../test_errors.py %s %flang -fopenacc
3 ! Check OpenACC clause validity for the following construct and directive:
6 program openacc_host_data_validity
10 integer, parameter :: N
= 256
11 real(8), dimension(N
, N
) :: aa
, bb
12 logical :: ifCondition
= .TRUE
.
14 !ERROR: At least one of USE_DEVICE clause must appear on the HOST_DATA directive
18 !$acc host_data use_device(aa)
21 !$acc host_data use_device(aa) if(.true.)
24 !$acc host_data use_device(aa) if(ifCondition)
27 !$acc host_data use_device(aa, bb) if_present
30 !ERROR: At most one IF_PRESENT clause can appear on the HOST_DATA directive
31 !$acc host_data use_device(aa, bb) if_present if_present
34 !$acc host_data use_device(aa, bb) if(.true.) if_present
37 !ERROR: At most one IF clause can appear on the HOST_DATA directive
38 !$acc host_data use_device(aa, bb) if(.true.) if(ifCondition)
41 end program openacc_host_data_validity