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 @@ -387,17 +387,13 @@ reason = "INTENT(OUT)"; } else if (dummy.intent == common::Intent::InOut) { reason = "INTENT(IN OUT)"; - } else if (dummyIsAsynchronous) { - reason = "ASYNCHRONOUS"; - } else if (dummyIsVolatile) { - reason = "VOLATILE"; } if (reason && scope) { bool vectorSubscriptIsOk{isElemental || dummyIsValue}; // 15.5.2.4(21) if (auto why{WhyNotModifiable( messages.at(), actual, *scope, vectorSubscriptIsOk)}) { if (auto *msg{messages.Say( - "Actual argument associated with %s %s must be definable"_err_en_US, // C1158 + "Actual argument associated with %s %s must be definable"_err_en_US, reason, dummyName)}) { msg->Attach(*why); } diff --git a/flang/test/Semantics/call03.f90 b/flang/test/Semantics/call03.f90 --- a/flang/test/Semantics/call03.f90 +++ b/flang/test/Semantics/call03.f90 @@ -284,10 +284,8 @@ call intentout_arr(a(j)) !ERROR: Actual argument associated with INTENT(IN OUT) dummy argument 'x=' must be definable call intentinout_arr(a(j)) - !ERROR: Actual argument associated with ASYNCHRONOUS dummy argument 'x=' must be definable - call asynchronous_arr(a(j)) - !ERROR: Actual argument associated with VOLATILE dummy argument 'x=' must be definable - call volatile_arr(a(j)) + call asynchronous_arr(a(j)) ! ok + call volatile_arr(a(j)) ! ok end subroutine subroutine coarr(x)