aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Semantics/mod-file.cpp
diff options
context:
space:
mode:
authorPeter Klausler <pklausler@nvidia.com>2025-03-26 12:09:38 -0700
committerGitHub <noreply@github.com>2025-03-26 12:09:38 -0700
commit6df27dd42d827a2468dcf4b4b1ee1a8e8af1a408 (patch)
treed585f2ef614691bdf07549357ecc17caa5f5582b /flang/lib/Semantics/mod-file.cpp
parent4ea5aa09deba468b250bebf3614e2a0cc57ec4b6 (diff)
downloadllvm-6df27dd42d827a2468dcf4b4b1ee1a8e8af1a408.zip
llvm-6df27dd42d827a2468dcf4b4b1ee1a8e8af1a408.tar.gz
llvm-6df27dd42d827a2468dcf4b4b1ee1a8e8af1a408.tar.bz2
[flang] Fix missed case of symbol renaming in module file generation (#132475)
The map of symbols requiring new local aliases for USE association needs to use the symbols' ultimate resolutions to avoid missing cases that can arise in convoluted codes with lots of confusing renamings. Fixes https://github.com/llvm/llvm-project/issues/132435.
Diffstat (limited to 'flang/lib/Semantics/mod-file.cpp')
-rw-r--r--flang/lib/Semantics/mod-file.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/flang/lib/Semantics/mod-file.cpp b/flang/lib/Semantics/mod-file.cpp
index c3b4626..ee356e5 100644
--- a/flang/lib/Semantics/mod-file.cpp
+++ b/flang/lib/Semantics/mod-file.cpp
@@ -348,7 +348,7 @@ void ModFileWriter::PrepareRenamings(const Scope &scope) {
uses_ << DEREF(sMod->symbol()).name() << ",only:";
if (rename != s->name()) {
uses_ << rename << "=>";
- renamings.emplace(&*s, rename);
+ renamings.emplace(&s->GetUltimate(), rename);
}
uses_ << s->name() << '\n';
useExtraAttrs_ << "private::" << rename << '\n';