miscompilation regarding pointer to optional slice #14952
Labels
backend-llvm
The LLVM backend outputs an LLVM IR Module.
bug
Observed behavior contradicts documented or intended behavior
frontend
Tokenization, parsing, AstGen, Sema, and Liveness.
miscompilation
The compiler reports success but produces semantically incorrect code.
Milestone
Zig Version
0.11.0-dev.2148+b3af5d076
Steps to Reproduce and Observed Behavior
Extracted from #14647.
Apply this diff:
If the diff no longer applies, look for this code:
zig/lib/std/Build/RunStep.zig
Lines 912 to 917 in b4d58e9
zig/lib/std/Build/RunStep.zig
Lines 1117 to 1122 in b4d58e9
Next, run
zig build test-behavior
and observe thestderr.?
safety check trip, even though non-null was assigned to that variable.I originally reported this as #14783, which has been fixed. But it seems there is another miscompilation.
Expected Behavior
With the diff applied,
zig build test
should have all passing tests.The text was updated successfully, but these errors were encountered: