1const E = enum(u32) { x };
2export fn entry1() void {
3 @compileLog(@as(E, @fromBackingInt(undefined)));
4}
5
6const S = packed struct(u32) { x: u32 };
7export fn entry2() void {
8 @compileLog(@as(S, @fromBackingInt(undefined)));
9}
10
11const U = packed union(u32) { x: u32 };
12export fn entry3() void {
13 @compileLog(@as(U, @fromBackingInt(undefined)));
14}
15
16// error
17//
18// :3:40: error: use of undefined value here causes illegal behavior
19//
20// Compile Log Output:
21// @as(tmp.S, undefined)
22// @as(tmp.U, undefined)