summaryrefslogtreecommitdiff
path: root/src/passes/Precompute.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/Precompute.cpp')
-rw-r--r--src/passes/Precompute.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/passes/Precompute.cpp b/src/passes/Precompute.cpp
index 44227a50f..99741ebe3 100644
--- a/src/passes/Precompute.cpp
+++ b/src/passes/Precompute.cpp
@@ -351,8 +351,10 @@ private:
if (set == nullptr) {
if (getFunction()->isVar(get->index)) {
auto localType = getFunction()->getLocalType(get->index);
- assert(!localType.isNonNullable() &&
- "Non-nullable locals must not use the default value");
+ if (localType.isNonNullable()) {
+ Fatal() << "Non-nullable local accessing the default value in "
+ << getFunction()->name << " (" << get->index << ')';
+ }
curr = Literal::makeZeros(localType);
} else {
// it's a param, so it's hopeless