[flang-commits] [flang] [flang] Fix crash when handling benign USE conflict (PR #121977)

Peter Klausler via flang-commits flang-commits at lists.llvm.org
Wed Jan 8 10:26:31 PST 2025


================
@@ -3319,6 +3323,8 @@ void ModuleVisitor::DoAddUse(SourceName location, SourceName localName,
         combinedDerivedType = CreateLocalUseError();
       } else {
         ConvertToUseError(*localSymbol, location, *useModuleScope_);
+        localDerivedType = nullptr;
+        localGeneric = nullptr;
----------------
klausler wrote:

Agreed, but this makes it explicit that the localXXXX pointers into the contents of localSymbol are being invalidated.

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


More information about the flang-commits mailing list