[flang-commits] [flang] [flang] Set SAVE attribute for EQUIVALENCEd symbols consistently. (PR #67078)
Peter Klausler via flang-commits
flang-commits at lists.llvm.org
Fri Sep 22 14:18:34 PDT 2023
================
@@ -2390,7 +2390,7 @@ Symbol &ScopeHandler::MakeHostAssocSymbol(
// These attributes can be redundantly reapplied without error
// on the host-associated name, at most once (C815).
symbol.implicitAttrs() =
- symbol.attrs() & Attrs{Attr::ASYNCHRONOUS, Attr::VOLATILE};
+ symbol.attrs() & Attrs{Attr::ASYNCHRONOUS, Attr::VOLATILE, Attr::SAVE};
----------------
klausler wrote:
An explicit `SAVE` statement for a name in a nested scope must create a new symbol. It is not possible for a `SAVE` statement in a nested scope to apply to a host-associated symbol.
https://github.com/llvm/llvm-project/pull/67078
More information about the flang-commits
mailing list