From 307746dc35b5757afc2108f44c5e9c3000e2a9e7 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Mon, 24 Dec 2012 12:52:15 +0100 Subject: [PATCH] Ensure that the members[] array is filled for vector types so the liferange function can use all of them --- ir.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ir.c b/ir.c index d578370..17bf16b 100644 --- a/ir.c +++ b/ir.c @@ -3240,8 +3240,12 @@ static bool ir_builder_gen_global(ir_builder *self, ir_value *global, bool isloc case TYPE_FIELD: if (pushdef) { vec_push(code_defs, def); - if (global->fieldtype == TYPE_VECTOR) + if (global->fieldtype == TYPE_VECTOR) { gen_vector_defs(def, global->name); + ir_value_vector_member(global, 0); + ir_value_vector_member(global, 1); + ir_value_vector_member(global, 2); + } } return gen_global_field(global); case TYPE_ENTITY: @@ -3277,6 +3281,9 @@ static bool ir_builder_gen_global(ir_builder *self, ir_value *global, bool isloc case TYPE_VECTOR: { size_t d; + ir_value_vector_member(global, 0); + ir_value_vector_member(global, 1); + ir_value_vector_member(global, 2); ir_value_code_setaddr(global, vec_size(code_globals)); if (global->hasvalue) { iptr = (int32_t*)&global->constval.ivec[0]; -- 2.39.2