summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ir/possible-contents.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ir/possible-contents.cpp b/src/ir/possible-contents.cpp
index 7a3cdc505..c44cd7ce1 100644
--- a/src/ir/possible-contents.cpp
+++ b/src/ir/possible-contents.cpp
@@ -2616,7 +2616,13 @@ void Flower::filterGlobalContents(PossibleContents& contents,
void Flower::filterDataContents(PossibleContents& contents,
const DataLocation& dataLoc) {
auto field = GCTypeUtils::getField(dataLoc.type, dataLoc.index);
- assert(field);
+ if (!field) {
+ // This is a bottom type; nothing will be written here.
+ assert(dataLoc.type.isBottom());
+ contents = PossibleContents::none();
+ return;
+ }
+
if (field->isPacked()) {
// We must handle packed fields carefully.
if (contents.isLiteral()) {