| author | |
| committer | |
| log | aa60d2a688c965dcccf8e2c42afe5c180daba8fc |
| tree | 47ac9dd0a965448e4969d3e21bb142f8b6542357 |
| parent | 7c5ceb0c4cdf5fafadd92b13048bc9878554abc4 |
3 files changed, 9 insertions(+), 1 deletions(-)
src/ir.cpp+1-1| ... | ... | @@ -16794,7 +16794,7 @@ static IrInstruction *ir_analyze_instruction_slice_type(IrAnalyze *ira, |
| 16794 | 16794 | case ZigTypeIdPromise: |
| 16795 | 16795 | case ZigTypeIdVector: |
| 16796 | 16796 | { |
| 16797 | if ((err = type_resolve(ira->codegen, child_type, ResolveStatusZeroBitsKnown))) | |
| 16797 | if ((err = type_resolve(ira->codegen, child_type, ResolveStatusAlignmentKnown))) | |
| 16798 | 16798 | return ira->codegen->invalid_instruction; |
| 16799 | 16799 | ZigType *slice_ptr_type = get_pointer_to_type_extra(ira->codegen, child_type, |
| 16800 | 16800 | is_const, is_volatile, PtrLenUnknown, align_bytes, 0, 0, is_allow_zero); |
test/stage1/behavior.zig+1| ... | ... | @@ -27,6 +27,7 @@ comptime { |
| 27 | 27 | _ = @import("behavior/bugs/2114.zig"); |
| 28 | 28 | _ = @import("behavior/bugs/2346.zig"); |
| 29 | 29 | _ = @import("behavior/bugs/2578.zig"); |
| 30 | _ = @import("behavior/bugs/2689.zig"); | |
| 30 | 31 | _ = @import("behavior/bugs/394.zig"); |
| 31 | 32 | _ = @import("behavior/bugs/421.zig"); |
| 32 | 33 | _ = @import("behavior/bugs/529.zig"); |
test/stage1/behavior/bugs/2689.zig created+7| ... | ... | @@ -0,0 +1,7 @@ |
| 1 | test "slice with alignment" { | |
| 2 | const S = packed struct { | |
| 3 | a: u8, | |
| 4 | }; | |
| 5 | ||
| 6 | var a: []align(8) S = undefined; | |
| 7 | } |