aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-09-17 16:13:55 -0400
committerAndrew Kelley <superjoe30@gmail.com>2017-09-17 16:13:55 -0400
commitfaaaf8832772108b240a277f984c9dbdd046f98e (patch)
treee1b4aa24ac2bcf0d1561b012d892b516f1c340f8 /src/ir.cpp
parent7ee00730ac5679ea5e24fac352ed9b72469f9329 (diff)
downloadzig-faaaf8832772108b240a277f984c9dbdd046f98e.tar.gz
zig-faaaf8832772108b240a277f984c9dbdd046f98e.zip
fix use of uninitialized variable in alignCast
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index ffe49179ca..e6e6345831 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -14732,6 +14732,7 @@ static IrInstruction *ir_align_cast(IrAnalyze *ira, IrInstruction *target, uint3
if (target_type->id == TypeTableEntryIdPointer) {
result_type = adjust_ptr_align(ira->codegen, target_type, align_bytes);
+ old_align_bytes = target_type->data.pointer.alignment;
} else if (target_type->id == TypeTableEntryIdFn) {
FnTypeId fn_type_id = target_type->data.fn.fn_type_id;
old_align_bytes = fn_type_id.alignment;