- Compiler assert when passing returning CT failure immediately rethrown #2689.

This commit is contained in:
Christoffer Lerno
2025-12-26 22:00:31 +01:00
parent e76278cfd7
commit a2c886a2d9
3 changed files with 55 additions and 0 deletions

View File

@@ -2369,6 +2369,12 @@ static inline void llvm_emit_deref(GenContext *c, BEValue *value, Expr *inner, T
break;
}
llvm_emit_expr(c, value, inner);
if (!c->current_block)
{
value->type = type_void;
*value = (BEValue) { .type = type_void, .kind = BE_VALUE, .value = NULL };
return;
}
llvm_value_rvalue(c, value);
AlignSize alignment = type_abi_alignment(type);
bool is_const = expr_is_const(inner);