From dd5c2f98fd6ec57d786f655ba26089d11305e971 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Mon, 17 Aug 2026 13:05:33 +0100 Subject: [PATCH] Always require the results of `asm` templates --- src/check_asm.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/check_asm.cpp b/src/check_asm.cpp index 24528dda6..6c077d1de 100644 --- a/src/check_asm.cpp +++ b/src/check_asm.cpp @@ -1331,6 +1331,10 @@ gb_internal void check_asm_template(AsmCtx *asm_ctx, CheckerContext *ctx, Entity Type *type = alloc_type_proc(ate->param_scope, params, params->Tuple.variables.count, results, results->Tuple.variables.count, false, pt->calling_convention); type->Proc.diverging = pt->diverging; + if (!type->Proc.diverging && results->Tuple.variables.count != 0) { + // always require the results of `asm` templates + type->Proc.require_results = true; + } entity->type = type;