diff options
| author | gingerBill <bill@gingerbill.org> | 2023-07-25 14:37:19 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2023-07-25 14:37:19 +0100 |
| commit | c4033c215e01343709a0d7928c277a6425f53524 (patch) | |
| tree | 9010d0f0f6df92383102f12a719ab3d84c20054c /src/tilde_proc.cpp | |
| parent | e914d551e7c4a89dfddeca5dd42f24716968c4e5 (diff) | |
Support non-constant global slices
Diffstat (limited to 'src/tilde_proc.cpp')
| -rw-r--r-- | src/tilde_proc.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/tilde_proc.cpp b/src/tilde_proc.cpp index 3a0624583..80948adea 100644 --- a/src/tilde_proc.cpp +++ b/src/tilde_proc.cpp @@ -408,8 +408,11 @@ gb_internal void cg_procedure_end(cgProcedure *p) { return; } if (tb_inst_get_control(p->func)) { - GB_ASSERT(p->type->Proc.result_count == 0); - tb_inst_ret(p->func, 0, nullptr); + if (p->type->Proc.result_count == 0) { + tb_inst_ret(p->func, 0, nullptr); + } else { + tb_inst_unreachable(p->func); + } } if (p->module->do_threading) { |