diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-08-26 22:49:59 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-08-26 22:50:12 -0400 |
| commit | a2e8ef77e2087e26c1449c56ad16efcea71679db (patch) | |
| tree | e0bf7d78160e05fb19f1a01bc8dfa5186243a343 /src/ir.cpp | |
| parent | db50cf7049b6171a280767e7b1cd0bd215848c92 (diff) | |
| download | zig-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.cpp | 4 |
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; |
