| ... | @@ -8,7 +8,7 @@ const S = packed struct { | ... | @@ -8,7 +8,7 @@ const S = packed struct { |
| 8 | test "overaligned pointer to packed struct" { | 8 | test "overaligned pointer to packed struct" { |
| 9 | var foo: S align(4) = .{ .a = 1, .b = 2 }; | 9 | var foo: S align(4) = .{ .a = 1, .b = 2 }; |
| 10 | const ptr: *align(4) S = &foo; | 10 | const ptr: *align(4) S = &foo; |
| 11 | const ptr_to_b: *u32 = &ptr.b; | 11 | const ptr_to_b = &ptr.b; |
| 12 | try expect(ptr_to_b.* == 2); | 12 | try expect(ptr_to_b.* == 2); |
| 13 | } | 13 | } |
| 14 | | 14 | |