Skip to content

Commit 66a871b

Browse files
committed
[flang] Fix crash in IsSaved()
Code was accessing ProcEntityDetails in a symbol that didn't have them. Differential Revision: https://reviews.llvm.org/D127011
1 parent 53c1584 commit 66a871b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flang/lib/Evaluate/tools.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1380,7 +1380,7 @@ bool IsSaved(const Symbol &original) {
13801380
} else if (const auto *object{symbol.detailsIf<ObjectEntityDetails>()};
13811381
object && object->init()) {
13821382
return true;
1383-
} else if (IsProcedurePointer(symbol) &&
1383+
} else if (IsProcedurePointer(symbol) && symbol.has<ProcEntityDetails>() &&
13841384
symbol.get<ProcEntityDetails>().init()) {
13851385
return true;
13861386
} else if (scope.hasSAVE()) {

0 commit comments

Comments
 (0)