Commit a2e8ef77e2

Andrew Kelley <andrew@ziglang.org>
2019-08-27 04:49:59
fix regression in one of the doc examples
1 parent db50cf7
Changed files (1)
src
src/ir.cpp
@@ -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;