[flang] Address review comment re: ALLOCATED intrinsic argument

Original-commit: flang-compiler/f18@b24381c7df
Reviewed-on: https://github.com/flang-compiler/f18/pull/611
Tree-same-pre-rewrite: false
This commit is contained in:
peter klausler 2019-08-01 14:01:06 -07:00
parent 25ff9296e0
commit ca57deed00

View file

@ -1497,9 +1497,7 @@ static bool ApplySpecificChecks(
if (const auto &arg{call.arguments[0]}) {
if (const auto *expr{arg->UnwrapExpr()}) {
if (const Symbol * symbol{GetLastSymbol(*expr)}) {
const Symbol &resolved{ResolveAssociations(*symbol)};
ok = resolved.has<semantics::ObjectEntityDetails>() &&
resolved.attrs().test(semantics::Attr::ALLOCATABLE);
ok = symbol->attrs().test(semantics::Attr::ALLOCATABLE);
}
}
}