diff options
| author | LemonBoy <thatlemon@gmail.com> | 2021-01-12 12:32:27 +0100 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-01-12 16:36:51 -0800 |
| commit | 65b7d2b4e1b82e98410520cbcfa029b205a37d92 (patch) | |
| tree | 9e13ef87e37556908ed082b05ebeeb24d9585bfd /src/stage1/ir.cpp | |
| parent | ffc8a43dfb6a44f4355693b5b1dae4712e0484d8 (diff) | |
| download | zig-65b7d2b4e1b82e98410520cbcfa029b205a37d92.tar.gz zig-65b7d2b4e1b82e98410520cbcfa029b205a37d92.zip | |
stage1: Resolve alignment earlier in @alignCast
Fixes #7744
Diffstat (limited to 'src/stage1/ir.cpp')
| -rw-r--r-- | src/stage1/ir.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stage1/ir.cpp b/src/stage1/ir.cpp index 0029a851a4..e39e44c3fd 100644 --- a/src/stage1/ir.cpp +++ b/src/stage1/ir.cpp @@ -30093,9 +30093,9 @@ static IrInstGen *ir_align_cast(IrAnalyze *ira, IrInstGen *target, uint32_t alig } if (target_type->id == ZigTypeIdPointer) { - result_type = adjust_ptr_align(ira->codegen, target_type, align_bytes); if ((err = resolve_ptr_align(ira, target_type, &old_align_bytes))) return ira->codegen->invalid_inst_gen; + result_type = adjust_ptr_align(ira->codegen, target_type, align_bytes); } else if (target_type->id == ZigTypeIdFn) { FnTypeId fn_type_id = target_type->data.fn.fn_type_id; old_align_bytes = fn_type_id.alignment; |
