fix regression in ir_get_ref

This commit is contained in:
Andrew Kelley 2019-08-26 15:43:39 -04:00
parent ae65c236c5
commit ca145a6d5a
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9

View File

@ -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,