fixes resolving aligment of child type in slice

This commit is contained in:
Jimmi HC
2019-06-16 02:10:06 +02:00
committed by Andrew Kelley
parent 7c5ceb0c4c
commit aa60d2a688
3 changed files with 9 additions and 1 deletions

View File

@@ -16794,7 +16794,7 @@ static IrInstruction *ir_analyze_instruction_slice_type(IrAnalyze *ira,
case ZigTypeIdPromise:
case ZigTypeIdVector:
{
if ((err = type_resolve(ira->codegen, child_type, ResolveStatusZeroBitsKnown)))
if ((err = type_resolve(ira->codegen, child_type, ResolveStatusAlignmentKnown)))
return ira->codegen->invalid_instruction;
ZigType *slice_ptr_type = get_pointer_to_type_extra(ira->codegen, child_type,
is_const, is_volatile, PtrLenUnknown, align_bytes, 0, 0, is_allow_zero);