aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-08-26 22:49:59 -0400
committerAndrew Kelley <andrew@ziglang.org>2019-08-26 22:50:12 -0400
commita2e8ef77e2087e26c1449c56ad16efcea71679db (patch)
treee0bf7d78160e05fb19f1a01bc8dfa5186243a343 /src/ir.cpp
parentdb50cf7049b6171a280767e7b1cd0bd215848c92 (diff)
downloadzig-a2e8ef77e2087e26c1449c56ad16efcea71679db.tar.gz
zig-a2e8ef77e2087e26c1449c56ad16efcea71679db.zip
fix regression in one of the doc examples
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index eb87706c57..d98521de8f 100644
--- a/src/ir.cpp
+++ b/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;