fix regression in one of the doc examples

This commit is contained in:
Andrew Kelley 2019-08-26 22:49:59 -04:00
parent db50cf7049
commit a2e8ef77e2
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9

View File

@ -14666,6 +14666,10 @@ static IrInstruction *ir_analyze_alloca(IrAnalyze *ira, IrInstruction *source_in
if ((err = type_resolve(ira->codegen, var_type, ResolveStatusZeroBitsKnown)))
return ira->codegen->invalid_instruction;
if (align != 0) {
if ((err = type_resolve(ira->codegen, var_type, ResolveStatusAlignmentKnown)))
return ira->codegen->invalid_instruction;
}
assert(result->base.value.data.x_ptr.special != ConstPtrSpecialInvalid);
pointee->type = var_type;