Skip to content

Revert "[Flang] Update the fix of PR 80738 to cover generic interface… #81321

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 10, 2024

Conversation

psteinfeld
Copy link
Contributor

… inside modules (#81087)"

This reverts commit 0802596.

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

… inside modules (llvm#81087)"

This reverts commit 0802596.

See comments in PR llvm#81087 for a test case that shows why I'm reverting.
@llvmbot llvmbot added flang Flang issues not falling into any other category flang:semantics labels Feb 9, 2024
@llvmbot
Copy link
Member

llvmbot commented Feb 9, 2024

@llvm/pr-subscribers-flang-semantics

Author: Pete Steinfeld (psteinfeld)

Changes

… inside modules (#81087)"

This reverts commit 0802596.

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 --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};

@psteinfeld psteinfeld merged commit cc02e50 into llvm:main Feb 10, 2024
@psteinfeld psteinfeld deleted the ps-revert-81087 branch July 9, 2024 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang:semantics flang Flang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants