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

Eugene Epshteyn via flang-commits flang-commits at lists.llvm.org
Mon Oct 20 09:29:03 PDT 2025


================
@@ -1729,17 +1729,13 @@ void AccAttributeVisitor::Post(const parser::Name &name) {
 
 Symbol *AccAttributeVisitor::ResolveAccCommonBlockName(
     const parser::Name *name) {
-  if (auto *prev{name
-              ? GetContext().scope.parent().FindCommonBlock(name->source)
-              : nullptr}) {
-    name->symbol = prev;
-    return prev;
-  }
-  // Check if the Common Block is declared in the current scope
-  if (auto *commonBlockSymbol{
-          name ? GetContext().scope.FindCommonBlock(name->source) : nullptr}) {
-    name->symbol = commonBlockSymbol;
-    return commonBlockSymbol;
+  if (!name) {
----------------
eugeneepshteyn wrote:

Done.

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


More information about the flang-commits mailing list