#zig build-obj {
--name test -fno-emit-bin
-Mroot=test.zig
#}

#write test.zig {
export fn a() void {
    var x: [*c]u8 = undefined;
    var y: *align(4) u8 = x;
    _ = .{ &x, &y };
}
export fn b() void {
    var x: [*c]const u8 = undefined;
    var y: *u8 = x;
    _ = .{ &x, &y };
}
export fn c() void {
    var x: [*c]u8 = undefined;
    var y: *u32 = x;
    _ = .{ &x, &y };
}
export fn d() void {
    var y: *align(1) u32 = undefined;
    var x: [*c]u32 = y;
    _ = .{ &x, &y };
}
export fn e() void {
    var y: *const u8 = undefined;
    var x: [*c]u8 = y;
    _ = .{ &x, &y };
}
export fn f() void {
    var y: *u8 = undefined;
    var x: [*c]u32 = y;
    _ = .{ &x, &y };
}
#}
#update
#check errors {
test.zig:3:27: error: expected type '*align(4) u8', found '[*c]u8'
test.zig:3:27: note: pointer alignment '1' cannot cast into pointer alignment '4'
test.zig:8:18: error: expected type '*u8', found '[*c]const u8'
test.zig:8:18: note: cast discards const qualifier
test.zig:13:19: error: expected type '*u32', found '[*c]u8'
test.zig:13:19: note: '[*c]u8' could have null values which are illegal in type '*u32'
test.zig:18:22: error: expected type '[*c]u32', found '*align(1) u32'
test.zig:18:22: note: pointer alignment '1' cannot cast into pointer alignment '4'
test.zig:23:21: error: expected type '[*c]u8', found '*const u8'
test.zig:23:21: note: cast discards const qualifier
test.zig:28:22: error: expected type '[*c]u32', found '*u8'
test.zig:28:22: note: pointer type child 'u8' cannot cast into pointer type child 'u32'
#}
