authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-01-27 17:45:29-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-01-27 17:45:29-05:00
logb96872ef2f619de476fb79c0bb142ebdace62382
tree1a67c2738595991e4d155ace22f022d35d49b475
parentc0fee9dfc7be5ab2c232a4787223a8e56a56745b
signaturelock-open Commit is signed but in an unrecognized format.

`@bitCast` result location: fix passing invalid alignment

when the value has 0 bits

1 files changed, 2 insertions(+), 1 deletions(-)

src/ir.cpp+2-1
......@@ -18525,10 +18525,11 @@ static IrInstGen *ir_resolve_result_raw(IrAnalyze *ira, IrInst *suspend_source_i
1852518525 return ira->codegen->invalid_inst_gen;
1852618526 }
1852718527
18528 uint64_t parent_ptr_align = get_ptr_align(ira->codegen, parent_ptr_type);
1852918528 if ((err = type_resolve(ira->codegen, value_type, ResolveStatusAlignmentKnown))) {
1853018529 return ira->codegen->invalid_inst_gen;
1853118530 }
18531 uint64_t parent_ptr_align = 0;
18532 if (type_has_bits(value_type)) parent_ptr_align = get_ptr_align(ira->codegen, parent_ptr_type);
1853218533 ZigType *ptr_type = get_pointer_to_type_extra(ira->codegen, value_type,
1853318534 parent_ptr_type->data.pointer.is_const, parent_ptr_type->data.pointer.is_volatile, PtrLenSingle,
1853418535 parent_ptr_align, 0, 0, parent_ptr_type->data.pointer.allow_zero);