-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[Flang] Update the fix of PR 80738 to cover generic interface inside modules #81087
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
Conversation
@llvm/pr-subscribers-flang-semantics Author: Daniel Chen (DanielCChen) ChangesThe following test cases crashes. The problem is that the fix for PR #80738 is not quite complete. It should
Full diff: https://github.com/llvm/llvm-project/pull/81087.diff 1 Files Affected:
diff --git a/flang/lib/Semantics/resolve-names.cpp b/flang/lib/Semantics/resolve-names.cpp
index 36deab969456d0..2a42c79161468a 100644
--- a/flang/lib/Semantics/resolve-names.cpp
+++ b/flang/lib/Semantics/resolve-names.cpp
@@ -5648,9 +5648,10 @@ void DeclarationVisitor::Post(const parser::ProcDecl &x) {
const auto &name{std::get<parser::Name>(x.t)};
const Symbol *procInterface{nullptr};
if (interfaceName_) {
- procInterface = interfaceName_->symbol->has<GenericDetails>()
- ? interfaceName_->symbol->get<GenericDetails>().specific()
- : interfaceName_->symbol;
+ Symbol *ultimate{&interfaceName_->symbol->GetUltimate()};
+ procInterface = ultimate->has<GenericDetails>()
+ ? ultimate->get<GenericDetails>().specific()
+ : ultimate;
}
auto attrs{HandleSaveName(name.source, GetAttrs())};
DerivedTypeDetails *dtDetails{nullptr};
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This change is causing some of our tests to fail. Here's an example. I have two files that are compiled separately. Here's the first file:
I then compile this file with
I then compile this file with
Weirdly, if I concatenate these two files, everything works. I'm planning to revert this change. Stay tuned for that. |
… inside modules (llvm#81087)" This reverts commit 0802596. See comments in PR llvm#81087 for a test case that shows why I'm reverting.
@psteinfeld Thanks for the notification. I will take a another look of the fix and your test case. |
#81544 is created to handle both the original case in this PR and the regressions. |
The following test cases crashes. The problem is that the fix for PR #80738 is not quite complete. It should
GetUltimate()
of theinterface_
before check if it is generic.