| 1 | const S = struct { |
| 2 | data: [1 << 32]u8, |
| 3 | }; |
| 4 | |
| 5 | const T = struct { |
| 6 | d1: [1 << 31]u8, |
| 7 | d2: [1 << 31]u8, |
| 8 | }; |
| 9 | |
| 10 | const U = union { |
| 11 | a: u32, |
| 12 | b: [1 << 32]u8, |
| 13 | }; |
| 14 | |
| 15 | comptime { |
| 16 | _ = @as(S, undefined); |
| 17 | } |
| 18 | comptime { |
| 19 | _ = @as(T, undefined); |
| 20 | } |
| 21 | comptime { |
| 22 | _ = @as(U, undefined); |
| 23 | } |
| 24 | |
| 25 | // error |
| 26 | // |
| 27 | // :1:11: error: struct layout requires size 4294967296, this compiler implementation supports up to 4294967295 |
| 28 | // :5:11: error: struct layout requires size 4294967296, this compiler implementation supports up to 4294967295 |
| 29 | // :10:11: error: union layout requires size 4294967300, this compiler implementation supports up to 4294967295 |