summaryrefslogtreecommitdiff
path: root/src/passes/Print.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/Print.cpp')
-rw-r--r--src/passes/Print.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp
index d49bc2974..427bff329 100644
--- a/src/passes/Print.cpp
+++ b/src/passes/Print.cpp
@@ -3238,6 +3238,11 @@ void PrintSExpression::visitMemory(Memory* curr) {
}
void PrintSExpression::visitDataSegment(DataSegment* curr) {
+ if (!curr->isPassive && !curr->offset) {
+ // This data segment must have been created from the datacount section but
+ // not parsed yet. Skip it.
+ return;
+ }
doIndent(o, indent);
o << '(';
printMajor(o, "data ");