Skip to content

Commit 50ec39c

Browse files
committed
make aliasscope more resilient to missing push
1 parent 29f61cd commit 50ec39c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/codegen.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6103,7 +6103,11 @@ static std::unique_ptr<Module> emit_function(
61036103
} else if (expr->head == popaliasscope_sym) {
61046104
scope_stack.pop_back();
61056105
scope_list_stack.pop_back();
6106-
current_aliasscope = scope_list_stack.back();
6106+
if (scope_list_stack.empty()) {
6107+
current_aliasscope = NULL;
6108+
} else {
6109+
current_aliasscope = scope_list_stack.back();
6110+
}
61076111
}
61086112
}
61096113
aliasscopes[i+1] = current_aliasscope;

0 commit comments

Comments
 (0)