[flang-commits] [flang] [flang] do not finalize or initialize unused entry dummy (PR #125482)
via flang-commits
flang-commits at lists.llvm.org
Mon Feb 3 06:49:05 PST 2025
================
@@ -956,7 +956,16 @@ static void instantiateLocal(Fortran::lower::AbstractConverter &converter,
Fortran::lower::SymMap &symMap) {
assert(!var.isAlias());
Fortran::lower::StatementContext stmtCtx;
+ // isUnusedEntryDummy must be computed before mapSymbolAttributes.
+ const bool isUnusedEntryDummy =
+ var.hasSymbol() ? Fortran::semantics::IsDummy(var.getSymbol()) &&
+ !symMap.lookupSymbol(var.getSymbol()).getAddr()
+ : false;
----------------
vdonaldson wrote:
Did you consider
```
const bool isUnusedEntryDummy =
var.hasSymbol() && Fortran::semantics::IsDummy(var.getSymbol()) &&
!symMap.lookupSymbol(var.getSymbol()).getAddr();
```
And this might be a reasonable time to delete the bogus blank line near the end of this function.
https://github.com/llvm/llvm-project/pull/125482
More information about the flang-commits
mailing list