aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/bad_alignCast_at_comptime.zig
blob: 0d2d91ece378baff0a90a6970991d564a238ebe5 (plain)
1
2
3
4
5
6
7
8
9
10
11
comptime {
    const ptr = @intToPtr(*align(1) i32, 0x1);
    const aligned = @alignCast(4, ptr);
    _ = aligned;
}

// error
// backend=stage2
// target=native
//
// :3:35: error: pointer address 0x1 is not aligned to 4 bytes