diff --git a/src/ir.cpp b/src/ir.cpp index ffe49179caa8c2b2533f5cafcdc9dc53084d2bb2..e6e6345831f2f17f94ab81d1c032547b00e8a6f4 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;