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

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