-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorfrontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.
Description
fn foo(x: ?[]const u8) [*]const u8 {
return @ptrCast(x);
}
comptime {
_ = &foo;
}$ zig build-obj repro.zig --verbose-air
# Begin Function AIR: repro.foo:
# Total AIR+Liveness bytes: 215B
# AIR Instructions: 7 (63B)
# AIR Extra Data: 10 (40B)
# Liveness tomb_bits: 8B
# Liveness Extra Data: 0 (0B)
# Liveness special table: 0 (0B)
%0 = arg(?[]const u8, "x")
%1!= dbg_stmt(2:12)
%2 = optional_payload(?[]const u8, %0!)
%3 = slice_ptr([*]const u8, %2!)
%4 = bitcast([*]const u8, %3!)
%5!= dbg_stmt(2:5)
%6!= ret_safe(%4!)
# End Function AIR: repro.foo
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorfrontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.