From b638c9858a8c8820fb51e5e4d13bcfe72351c2ce Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Wed, 8 Sep 2021 18:29:27 +0200 Subject: [PATCH] :bug: Make emit_decl_global match non_static --- src/emit/emit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/emit/emit.c b/src/emit/emit.c index 5d41d5c1..5a16afb9 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -927,7 +927,7 @@ ANN static m_bool emit_exp_decl_global(const Emitter emit, const Exp_Decl *decl, instr->m_val = (m_uint)&v->d.ptr; set_vflag(v, vflag_direct); // mpalloc instr->m_val2 = v->type->size; - if (is_obj && (is_array || !is_ref || emit_addr)) { + if (is_obj && (is_array || !is_ref)) { const Instr assign = emit_add_instr(emit, Assign); assign->m_val = emit_var; (void)emit_object_addref(emit, -SZ_INT, emit_var); -- 2.43.0