diff options
author | Peter Klausler <35819229+klausler@users.noreply.github.com> | 2024-05-01 12:07:28 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-01 12:07:28 -0700 |
commit | 71113047298ccb92e6c636a535f0f855a04ee0db (patch) | |
tree | 4ed7d9e8512d5734eb098f9c950a82f32ea95bb1 | |
parent | f0fbccb15384393a2ede3328517c1050e9f468ae (diff) |
[flang] Fix CHECK() crash in module file generator (#90234)
A sanity CHECK() in mod-file.cpp needs to allow for USE association of a
derived type that has the same name as a locally defined generic
interface.
Fixes https://github.com/llvm/llvm-project/issues/90192.
-rw-r--r-- | flang/lib/Semantics/mod-file.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/flang/lib/Semantics/mod-file.cpp b/flang/lib/Semantics/mod-file.cpp index 4a531c3c0f99..923107210a94 100644 --- a/flang/lib/Semantics/mod-file.cpp +++ b/flang/lib/Semantics/mod-file.cpp @@ -202,7 +202,7 @@ static void HarvestInitializerSymbols( HarvestInitializerSymbols(set, *dtSym.scope()); } } else { - CHECK(dtSym.has<UseErrorDetails>()); + CHECK(dtSym.has<UseDetails>() || dtSym.has<UseErrorDetails>()); } } else if (IsNamedConstant(*symbol) || scope.IsDerivedType()) { if (const auto *object{symbol->detailsIf<ObjectEntityDetails>()}) { |