diff --git a/flang/test/Semantics/OpenACC/acc-host-data.f90 b/flang/test/Semantics/OpenACC/acc-host-data.f90 --- a/flang/test/Semantics/OpenACC/acc-host-data.f90 +++ b/flang/test/Semantics/OpenACC/acc-host-data.f90 @@ -27,9 +27,14 @@ !$acc host_data use_device(aa, bb) if_present !$acc end host_data + !ERROR: At most one IF_PRESENT clause can appear on the HOST_DATA directive + !$acc host_data use_device(aa, bb) if_present if_present + !$acc end host_data + !$acc host_data use_device(aa, bb) if(.true.) if_present !$acc end host_data + !ERROR: At most one IF clause can appear on the HOST_DATA directive !$acc host_data use_device(aa, bb) if(.true.) if(ifCondition) !$acc end host_data diff --git a/llvm/include/llvm/Frontend/OpenACC/ACC.td b/llvm/include/llvm/Frontend/OpenACC/ACC.td --- a/llvm/include/llvm/Frontend/OpenACC/ACC.td +++ b/llvm/include/llvm/Frontend/OpenACC/ACC.td @@ -506,7 +506,7 @@ // 2.8 def ACC_HostData : Directive<"host_data"> { - let allowedClauses = [ + let allowedOnceClauses = [ VersionedClause, VersionedClause ];