From cb55803a59d4fe99b527dc3ffc5674666511f729 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 25 Jun 2019 13:57:45 -0400 Subject: fix implicit cast vector to array --- src/ir.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/ir.cpp') diff --git a/src/ir.cpp b/src/ir.cpp index 2991dd5186..98d6cb25df 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -12283,6 +12283,9 @@ static IrInstruction *ir_analyze_vector_to_array(IrAnalyze *ira, IrInstruction * result->value.type = array_type; return result; } + if (result_loc == nullptr) { + result_loc = no_result_loc(); + } IrInstruction *result_loc_inst = ir_resolve_result(ira, source_instr, result_loc, array_type, nullptr, true, false); if (type_is_invalid(result_loc_inst->value.type) || instr_is_unreachable(result_loc_inst)) { return result_loc_inst; -- cgit v1.2.3