diff --git a/flang/lib/Semantics/check-call.cpp b/flang/lib/Semantics/check-call.cpp index e6a8434b1d7b30..c6712c70c9e0b5 100644 --- a/flang/lib/Semantics/check-call.cpp +++ b/flang/lib/Semantics/check-call.cpp @@ -46,7 +46,7 @@ static void CheckImplicitInterfaceArg( } } if (const auto *expr{arg.UnwrapExpr()}) { - if (IsBOZLiteral(*expr)) { + if (std::holds_alternative(expr->u)) { messages.Say("BOZ argument requires an explicit interface"_err_en_US); } else if (evaluate::IsNullPointer(*expr)) { messages.Say( diff --git a/flang/test/Semantics/boz-literal-constants.f90 b/flang/test/Semantics/boz-literal-constants.f90 index a0db6faddea913..8acdcd5b3f6c33 100644 --- a/flang/test/Semantics/boz-literal-constants.f90 +++ b/flang/test/Semantics/boz-literal-constants.f90 @@ -79,7 +79,4 @@ subroutine bozchecks !ERROR: BOZ argument requires an explicit interface call implictSub(Z'12345') - - !ERROR: Output item must not be a BOZ literal constant - print "(Z18)", Z"76543210" end subroutine