diff --git a/flang/lib/Semantics/check-call.cpp b/flang/lib/Semantics/check-call.cpp --- a/flang/lib/Semantics/check-call.cpp +++ b/flang/lib/Semantics/check-call.cpp @@ -46,6 +46,10 @@ } } if (const auto *expr{arg.UnwrapExpr()}) { + if (std::holds_alternative(expr->u)) { + messages.Say( + "BOZ argument not allowed in an implicit interface"_err_en_US); + } if (auto named{evaluate::ExtractNamedEntity(*expr)}) { const Symbol &symbol{named->GetLastSymbol()}; if (symbol.Corank() > 0) { diff --git a/flang/test/Semantics/boz-literal-constants.f90 b/flang/test/Semantics/boz-literal-constants.f90 --- a/flang/test/Semantics/boz-literal-constants.f90 +++ b/flang/test/Semantics/boz-literal-constants.f90 @@ -77,4 +77,7 @@ res = MERGE_BITS(B"1101",3,B"1011") res = REAL(B"1101") + + !ERROR: BOZ argument not allowed in an implicit interface + call implictSub(Z'12345') end subroutine