Fix global constant union initialization bug.

This commit is contained in:
gingerBill
2026-05-29 09:38:56 +01:00
parent baa4169744
commit eaa32a82e8
2 changed files with 38 additions and 3 deletions

View File

@@ -3421,7 +3421,8 @@ gb_internal bool lb_generate_code(lbGenerator *gen) {
cc.link_section = e->Variable.link_section;
ExactValue v = tav.value;
lbValue init = lb_const_value(m, e->type, v, cc);
lbValue init = lb_const_value(m, e->type, v, cc, tav.type);
LLVMDeleteGlobal(g.value);
g.value = nullptr;