Increase n_iregs when passing aggregate by ref.
@@ -126,6 +126,7 @@ static void target_add_res (MIR_context_t ctx, struct func_type *func_type,
var.type = MIR_POINTER_TYPE;
VARR_PUSH (MIR_var_t, proto_info.arg_vars, var);
proto_info.res_ref_p = TRUE;
+ arg_info->n_iregs++;
}
var.name = RET_VAL_NAME;
var.type = get_mir_type (ctx, func_type->ret_type);
