Arrays are now represented with ObjectEntityDetails, not EntityDetails.
So that's what we have to look for when rewriting function calls to
array element references.
Original-commit: flang-compiler/f18@
841b37d94bc02f5a8726873fff7182cee053c8c3
Reviewed-on: https://github.com/flang-compiler/f18/pull/177
Tree-same-pre-rewrite: false
for (auto it{list.begin()}; it != list.end();) {
if (auto stmt{std::get_if<stmtFuncType>(&it->u)}) {
Symbol *symbol{std::get<parser::Name>(stmt->statement->t).symbol};
- if (symbol && symbol->has<EntityDetails>()) {
+ if (symbol && symbol->has<ObjectEntityDetails>()) {
// not a stmt func: remove it here and add to ones to convert
stmtFuncsToConvert.push_back(std::move(*stmt));
it = list.erase(it);
}
parser::Name *name = std::get_if<parser::Name>(
&std::get<parser::ProcedureDesignator>((*funcRef)->v.t).u);
- if (!name || !name->symbol || !name->symbol->has<EntityDetails>()) {
+ if (!name || !name->symbol || !name->symbol->has<ObjectEntityDetails>()) {
return;
}
x.u = common::Indirection{(*funcRef)->ConvertToArrayElementRef()};