[flang-commits] [flang] [flang] Do not write implicit SAVE attribute into the mod file. (PR #67215)

Peter Klausler via flang-commits flang-commits at lists.llvm.org
Mon Sep 25 08:58:39 PDT 2023


================
@@ -244,6 +244,14 @@ bool ModFileWriter::PutComponents(const Symbol &typeSymbol) {
   }
 }
 
+// Return the symbol's attributes that should be written
+// into the mod file.
+static Attrs getSymbolAttrsToWrite(const Symbol &symbol) {
+  // Is SAVE attribute is implicit, it should be omitted
+  // to not violate F202x C862 for a common block member.
+  return symbol.attrs() & ~(symbol.implicitAttrs() & Attrs{Attr::SAVE});
----------------
klausler wrote:

Ok, good point; ship it.

https://github.com/llvm/llvm-project/pull/67215


More information about the flang-commits mailing list