aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-08-29 17:10:11 -0400
committerAndrew Kelley <superjoe30@gmail.com>2017-08-29 17:10:11 -0400
commit910a96f0468c635a135d9fccd39f139ba0775ef9 (patch)
tree7a8873846ea70892414e79585e5c64f3a0ccfa67 /src/ir.cpp
parent816689a3b1c98ec008438e7f868e1a123889b2a7 (diff)
downloadzig-910a96f0468c635a135d9fccd39f139ba0775ef9.tar.gz
zig-910a96f0468c635a135d9fccd39f139ba0775ef9.zip
fix tests
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp1
1 files changed, 1 insertions, 0 deletions
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) {