Closed
Description
Zig Version: 0.10.0-dev.2896+fa40bddf2
Reproduce:
$ stage1/bin/zig test ../lib/std/std.zig -target riscv64-linux-none
Test [541/2199] leb128.test "std-riscv64-linux-none-Debug-bare-multi-default serialize ... FAIL (TestUnexpectedResult)
/home/andy/dev/zig/lib/std/leb128.zig:333:5: 0x57fb47 in leb128.test_write_leb128 (test)
try testing.expect(w1_pos == bytes_needed);
^
Test [542/2199] leb128.test "std-riscv64-linux-none-Debug-bare-multi-default serialize ... FAIL (TestUnexpectedResult)
/home/andy/dev/zig/lib/std/leb128.zig:333:5: 0x57fb47 in leb128.test_write_leb128 (test)
try testing.expect(w1_pos == bytes_needed);
^
2127 passed; 70 skipped; 2 failed.
error: the following test command failed with exit code 1:
qemu-riscv64 /home/andy/dev/zig/zig-cache/o/58c985004802103d620615fe2c55895a/test /home/andy/dev/zig/build-llvm14-debug/stage1/bin/zig
test...The following command exited with error code 1:
/home/andy/dev/zig/build-llvm14-debug/stage1/bin/zig test /home/andy/dev/zig/lib/std/std.zig --test-name-prefix std-riscv64-linux-none-Debug-bare-multi-default --cache-dir /home/andy/dev/zig/zig-cache --global-cache-dir /home/andy/.cache/zig --name test -fno-single-threaded -target riscv64-linux-none -mcpu baseline_rv64 --test-cmd qemu-riscv64 --test-cmd-bin -I /home/andy/dev/zig/test -L /home/andy/local/llvm14-debug/lib -isystem /home/andy/local/llvm14-debug/include --zig-lib-dir /home/andy/dev/zig/lib --enable-cache
Failing test cases:
Lines 348 to 378 in aab1284
Next steps:
- Create LLVM IR test case
- Use
llvm-reduce
to create reduction - Check if bug is present on trunk
- File upstream bug report
Metadata
Metadata
Assignees
Labels
32-bit and 64-bit RISC-VThe LLVM backend outputs an LLVM IR Module.Observed behavior contradicts documented or intended behaviorThis issue is limited in scope and/or knowledge of Zig internals.The compiler reports success but produces semantically incorrect code.It worked in a previous version of Zig, but stopped working.An issue with a third party project that Zig uses.