aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/union_depends_on_pointer_alignment.zig
blob: 2b97a3fb54207efde38a61c0fc505f7b0721b984 (plain)
1
2
3
4
5
6
7
8
9
10
11
const U = union {
    next: ?*align(1) U align(128),
};

export fn entry() usize {
    return @alignOf(U);
}

// error
//
// :1:11: error: union layout depends on being pointer aligned