X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=ast.c;h=dbb2012f383bffa9ab6ef2654cd9516a813ca0f1;hb=1d05cd28ee07c9b7b71fe3399fd8acf1977eb506;hp=ddbffb961d20f31c8ddadfa6d44e0f12df4029a7;hpb=a01388ea7dc38a8d895488e63d0ec9d875159156;p=xonotic%2Fgmqcc.git diff --git a/ast.c b/ast.c index ddbffb9..dbb2012 100644 --- a/ast.c +++ b/ast.c @@ -2253,6 +2253,8 @@ bool ast_array_index_codegen(ast_array_index *self, ast_function *func, bool lva *out = ir_call_value(call); self->expression.outr = *out; + (*out)->vtype = self->expression.vtype; + codegen_output_type(self, *out); return true; } @@ -2278,6 +2280,8 @@ bool ast_array_index_codegen(ast_array_index *self, ast_function *func, bool lva compile_error(ast_ctx(self), "array indexing here needs an integer constant"); return false; } + (*out)->vtype = self->expression.vtype; + codegen_output_type(self, *out); return true; }