Repository navigation
x86 backend encoding failure concatenating slice #25485
Description
Activity
- addedbugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavior
on Oct 5, 2025 cc @jacobly0;
except, uh, looking at it, this could well be a frontend OPV bug...- changed the title
[-]Untyped slice compiler bug.[/-][+]x86 backend encoding failure [/+]on Oct 11, 2025 - changed the title
[-]x86 backend encoding failure [/-][+]x86 backend encoding failure concatenating `[]void`[/+]on Oct 11, 2025 AndrewKraevskii commented
on Oct 11, 2025 ContributorAuthorMore actions@mlugg its not related to void. It would happen with any type I just chose void since its simpler. Maybe I shouldn't have
- changed the title
[-]x86 backend encoding failure concatenating `[]void`[/-][+]x86 backend encoding failure concatenating slice[/+]on Oct 11, 2025 Ah, okay, in that case it's more likely to be a backend bug.
- addedfrontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.and removedarch-x86_6464-bit x8664-bit x86
on Oct 11, 2025 Pretty sure the original repro had some additional OPV bugs.
very many bugs in this
a.zig:4:30: error: unable to evaluate comptime expression _ = comptime typed_slice ++ &[1]u8{0}; ~~~~~~~~~~~~^~~~~~~~~~~~ a.zig:4:18: note: operation is runtime due to this operand _ = comptime typed_slice ++ &[1]u8{0}; ^~~~~~~~~~~ a.zig:4:9: note: 'comptime' keyword forces comptime evaluation _ = comptime typed_slice ++ &[1]u8{0}; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~this one i believe is because the empty tuple -> slice conversion gives the pointer an integer representation https://github.com/ziglang/zig/blob/95242cc43132c7b6aeb2f7171389075859aba008/src/Sema.zig#L28797-L28800
AndrewKraevskii commented
on Oct 11, 2025 ContributorAuthorMore actionsvery many bugs in this
a.zig:4:30: error: unable to evaluate comptime expression _ = comptime typed_slice ++ &[1]u8{0}; ~~~~~~~~~~~~^~~~~~~~~~~~ a.zig:4:18: note: operation is runtime due to this operand _ = comptime typed_slice ++ &[1]u8{0}; ^~~~~~~~~~~ a.zig:4:9: note: 'comptime' keyword forces comptime evaluation _ = comptime typed_slice ++ &[1]u8{0}; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~this one i believe is because the empty tuple -> slice conversion gives the pointer an integer representation https://github.com/ziglang/zig/blob/95242cc43132c7b6aeb2f7171389075859aba008/src/Sema.zig#L28797-L28800
This is the error I got originally. I tried to simplify reproduction but error changed to other at some point.
Zig Version
0.16.0-dev.604+e932ab003
Steps to Reproduce and Observed Behavior
Expected Behavior
I expect it to compile or give error about types not matching. This compiles on llvm backend.