[flang-commits] [flang] Revert "[Flang] Update the fix of PR 80738 to cover generic interface… (PR #81321)

via flang-commits flang-commits at lists.llvm.org
Fri Feb 9 13:42:03 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-flang-semantics

Author: Pete Steinfeld (psteinfeld)

<details>
<summary>Changes</summary>

… inside modules (#<!-- -->81087)"

This reverts commit 0802596df3d1ffd15f6b828a0f5c1e5b687a730f.

See comments in PR #<!-- -->81087 for a test case that shows why I'm reverting.

---
Full diff: https://github.com/llvm/llvm-project/pull/81321.diff


1 Files Affected:

- (modified) flang/lib/Semantics/resolve-names.cpp (+3-4) 


``````````diff
diff --git a/flang/lib/Semantics/resolve-names.cpp b/flang/lib/Semantics/resolve-names.cpp
index 2a42c79161468..36deab969456d 100644
--- a/flang/lib/Semantics/resolve-names.cpp
+++ b/flang/lib/Semantics/resolve-names.cpp
@@ -5648,10 +5648,9 @@ void DeclarationVisitor::Post(const parser::ProcDecl &x) {
   const auto &name{std::get<parser::Name>(x.t)};
   const Symbol *procInterface{nullptr};
   if (interfaceName_) {
-    Symbol *ultimate{&interfaceName_->symbol->GetUltimate()};
-    procInterface = ultimate->has<GenericDetails>()
-        ? ultimate->get<GenericDetails>().specific()
-        : ultimate;
+    procInterface = interfaceName_->symbol->has<GenericDetails>()
+        ? interfaceName_->symbol->get<GenericDetails>().specific()
+        : interfaceName_->symbol;
   }
   auto attrs{HandleSaveName(name.source, GetAttrs())};
   DerivedTypeDetails *dtDetails{nullptr};

``````````

</details>


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


More information about the flang-commits mailing list