From 910a96f0468c635a135d9fccd39f139ba0775ef9 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 29 Aug 2017 17:10:11 -0400 Subject: fix tests --- src/ir.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/ir.cpp') diff --git a/src/ir.cpp b/src/ir.cpp index f7f097e99d..251c597224 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -10825,6 +10825,7 @@ static TypeTableEntry *ir_analyze_instruction_elem_ptr(IrAnalyze *ira, IrInstruc if (array_type->data.array.len == 0) { ir_add_error_node(ira, elem_ptr_instruction->base.source_node, buf_sprintf("index 0 outside array of size 0")); + return ira->codegen->builtin_types.entry_invalid; } TypeTableEntry *child_type = array_type->data.array.child_type; if (ptr_type->data.pointer.unaligned_bit_count == 0) { -- cgit v1.2.3