Skip to content

Commit 7111304

Browse files
authored
[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 #90192.
1 parent f0fbccb commit 7111304

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flang/lib/Semantics/mod-file.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ static void HarvestInitializerSymbols(
202202
HarvestInitializerSymbols(set, *dtSym.scope());
203203
}
204204
} else {
205-
CHECK(dtSym.has<UseErrorDetails>());
205+
CHECK(dtSym.has<UseDetails>() || dtSym.has<UseErrorDetails>());
206206
}
207207
} else if (IsNamedConstant(*symbol) || scope.IsDerivedType()) {
208208
if (const auto *object{symbol->detailsIf<ObjectEntityDetails>()}) {

0 commit comments

Comments
 (0)