Add compile error test case for union layout depending on pointer alignment

This commit is contained in:
kcbanner 2023-10-25 13:27:29 -04:00 committed by Matthew Lugg
parent fb523c6283
commit 825da34769

View File

@ -0,0 +1,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