Index: flang/lib/Semantics/check-declarations.cpp =================================================================== --- flang/lib/Semantics/check-declarations.cpp +++ flang/lib/Semantics/check-declarations.cpp @@ -428,6 +428,11 @@ " of a module"_err_en_US, symbol.name()); } + if (symbol.attrs().test(Attr::ASYNCHRONOUS) && + !evaluate::IsVariable(symbol)) { + messages_.Say( + "An entity may not have the ASYNCHRONOUS attribute unless it is a variable"_err_en_US); + } } void CheckHelper::CheckCommonBlock(const Symbol &symbol) { Index: flang/test/Semantics/resolve20.f90 =================================================================== --- flang/test/Semantics/resolve20.f90 +++ flang/test/Semantics/resolve20.f90 @@ -53,6 +53,10 @@ !ERROR: EXTERNAL attribute not allowed on 'bar' external :: bar + !ERROR: An entity may not have the ASYNCHRONOUS attribute unless it is a variable + asynchronous :: async + external :: async + !ERROR: PARAMETER attribute not allowed on 'm' parameter(m=2) !ERROR: PARAMETER attribute not allowed on 'foo'