Sema: validate bitcast operand type

This commit is contained in:
Veikka Tuominen
2022-07-28 15:00:40 +03:00
parent e7b6a18331
commit 57f9405a8f
6 changed files with 97 additions and 35 deletions

View File

@@ -0,0 +1,10 @@
pub export fn entry() void {
var y = @intToPtr([*]align(4) u8, 5);
_ = y;
}
// error
// backend=stage2
// target=native
//
// :2:39: error: pointer type '[*]align(4) u8' requires aligned address