diff --git a/flang/test/Semantics/acc-clause-validity.f90 b/flang/test/Semantics/acc-clause-validity.f90 --- a/flang/test/Semantics/acc-clause-validity.f90 +++ b/flang/test/Semantics/acc-clause-validity.f90 @@ -27,7 +27,7 @@ logical, dimension(N) :: d, e real :: reduction_r logical :: reduction_l - real(8), dimension(N, N) :: aa + real(8), dimension(N, N) :: aa, bb logical :: ifCondition = .TRUE. !ERROR: At least one clause is required on the DECLARE directive @@ -99,6 +99,21 @@ !$acc host_data !$acc end host_data + !$acc host_data use_device(aa) + !$acc end host_data + + !$acc host_data use_device(aa) if(.true.) + !$acc end host_data + + !$acc host_data use_device(aa) if(ifCondition) + !$acc end host_data + + !$acc host_data use_device(aa, bb) if_present + !$acc end host_data + + !$acc host_data use_device(aa, bb) if(.true.) if_present + !$acc end host_data + !ERROR: At least one of DEFAULT_ASYNC, DEVICE_NUM, DEVICE_TYPE clause must appear on the SET directive !$acc set