master
 1const std = @import("std");
 2const expect = std.testing.expect;
 3
 4const S = packed struct {
 5    a: u32,
 6    b: u32,
 7};
 8test "overaligned pointer to packed struct" {
 9    var foo: S align(4) = .{ .a = 1, .b = 2 };
10    const ptr: *align(4) S = &foo;
11    const ptr_to_b = &ptr.b;
12    try expect(ptr_to_b.* == 2);
13}
14
15// test