[flang-commits] [PATCH] D117902: [flang] Fix crash from USE-associated defined I/O subprograms

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Fri Jan 21 17:49:24 PST 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rG3726626a26ec: [flang] Fix crash from USE-associated defined I/O subprograms (authored by klausler).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117902/new/

https://reviews.llvm.org/D117902

Files:
  flang/lib/Semantics/runtime-type-info.cpp


Index: flang/lib/Semantics/runtime-type-info.cpp
===================================================================
--- flang/lib/Semantics/runtime-type-info.cpp
+++ flang/lib/Semantics/runtime-type-info.cpp
@@ -1065,7 +1065,7 @@
     GenericKind::DefinedIo definedIo, const Scope *scope) {
   for (; !scope->IsGlobal(); scope = &scope->parent()) {
     if (auto asst{scope->find(name)}; asst != scope->end()) {
-      const Symbol &generic{*asst->second};
+      const Symbol &generic{asst->second->GetUltimate()};
       const auto &genericDetails{generic.get<GenericDetails>()};
       CHECK(std::holds_alternative<GenericKind::DefinedIo>(
           genericDetails.kind().u));


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117902.402148.patch
Type: text/x-patch
Size: 682 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220122/b69ffea3/attachment.bin>


More information about the flang-commits mailing list