From: Jérémie Astor Date: Wed, 8 Sep 2021 16:29:27 +0000 (+0200) Subject: :bug: Make emit_decl_global match non_static X-Git-Tag: nightly~456 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=b638c9858a8c8820fb51e5e4d13bcfe72351c2ce;p=gwion.git :bug: Make emit_decl_global match non_static --- 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);