[flang-commits] [flang] [flang][OpenACC] Relax COMMON block usage restriction in OpenACC directives (PR #162659)

Peter Klausler via flang-commits flang-commits at lists.llvm.org
Tue Oct 21 11:35:33 PDT 2025


================
@@ -186,10 +193,30 @@ class Scope {
   // Cray pointers are saved as map of pointee name -> pointer symbol
   const mapType &crayPointers() const { return crayPointers_; }
   void add_crayPointer(const SourceName &, Symbol &);
-  mapType &commonBlocks() { return commonBlocks_; }
-  const mapType &commonBlocks() const { return commonBlocks_; }
   Symbol &MakeCommonBlock(SourceName, SourceName location);
-  Symbol *FindCommonBlock(const SourceName &) const;
+  bool AddCommonBlockUse(
+      const SourceName &name, Attrs attrs, Symbol &cbUltimate);
+
+  // Find COMMON block that is declared in the current scope
----------------
klausler wrote:

Are these new member functions ever needed in Evaluate headers or source files?  If not, they should probably be defined in scope.cpp, not inline here.

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


More information about the flang-commits mailing list