aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-08-26 15:43:39 -0400
committerAndrew Kelley <andrew@ziglang.org>2019-08-26 15:43:39 -0400
commitca145a6d5a430cd87d0b242fb7453e8249221cd0 (patch)
treeb59980f343420c5efaa3ec79072dba1c320e032e
parentae65c236c55a1e22e63bb9f03c1ff925268646f1 (diff)
downloadzig-ca145a6d5a430cd87d0b242fb7453e8249221cd0.tar.gz
zig-ca145a6d5a430cd87d0b242fb7453e8249221cd0.zip
fix regression in ir_get_ref
-rw-r--r--src/ir.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index db7c2f1b53..832983dbf7 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -11210,6 +11210,9 @@ static IrInstruction *ir_get_ref(IrAnalyze *ira, IrInstruction *source_instructi
ZigType *ptr_type = get_pointer_to_type_extra(ira->codegen, value->value.type,
is_const, is_volatile, PtrLenSingle, 0, 0, 0, false);
+ if ((err = type_resolve(ira->codegen, ptr_type, ResolveStatusZeroBitsKnown)))
+ return ira->codegen->invalid_instruction;
+
IrInstruction *result_loc;
if (type_has_bits(ptr_type) && !handle_is_ptr(value->value.type)) {
result_loc = ir_resolve_result(ira, source_instruction, no_result_loc(), value->value.type, nullptr, true,