zig
zig copied to clipboard
Assertion failed: LC != RTLIB::UNKNOWN_LIBCALL && "Unexpected fp-to-sint conversion!"
Zig Version
0.11.0-dev.1869+df4cfc2ec
Steps to Reproduce and Observed Behavior
Enable the tests added by https://github.com/ziglang/zig/pull/15981 (Search for the issue number of this issue.)
I haven't bisected the problem yet, but it probably has something to do with @floatToInt()
, @intToFloat()
, or @floatCast()
in lib/std/json/static.zig: internalParseFromValue()
.
Here's some of the output from https://github.com/ziglang/zig/actions/runs/5317291166/jobs/9627668978?pr=15981
[...]
+ stage3-debug/bin/zig build test docs --maxrss 21000000000 -fqemu -fwasmtime -Dstatic-llvm -Dtarget=native-native-musl --search-prefix /home/ci/deps/zig+llvm+lld+clang-x86_64-linux-musl-0.11.0-dev.1869+df4cfc2ec --zig-lib-dir /home/ci/actions-runner5/_work/zig/zig/build-debug/../lib
zig test test-c-abi-arm-linux-musleabihf-ReleaseFast ReleaseFast arm-linux-musleabihf: error: warning(link): unexpected LLD stderr:
ld.lld: warning: Linking two modules of different target triples: '/home/ci/actions-runner5/_work/zig/zig/build-debug/zig-local-cache/o/4bf8fdc825b1bb06b339d33127a171fb/test-c-abi-arm-linux-musleabihf-ReleaseFast.o' is 'arm-unknown-linux-musleabihf' whereas 'ld-temp.o' is 'armv6kz-unknown-linux-musleabihf'
zig test Debug aarch64-macos-none: error: Assertion failed: LC != RTLIB::UNKNOWN_LIBCALL && "Unexpected fp-to-sint conversion!" (/home/andy/dev/zig-bootstrap/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp: ExpandIntRes_FP_TO_SINT: 3433)
zig test Debug aarch64-macos-none: error: the following command terminated unexpectedly:
/home/ci/actions-runner5/_work/zig/zig/build-debug/stage3-debug/bin/zig test /home/ci/actions-runner5/_work/zig/zig/lib/std/std.zig --cache-dir /home/ci/actions-runner5/_work/zig/zig/build-debug/zig-local-cache --global-cache-dir /home/ci/actions-runner5/_work/zig/zig/build-debug/zig-global-cache --name test -target aarch64-macos-none -mcpu generic -I /home/ci/actions-runner5/_work/zig/zig/test -L /home/ci/deps/zig+llvm+lld+clang-x[86](https://github.com/ziglang/zig/actions/runs/5317291166/jobs/9627668978?pr=15981#step:3:87)_64-linux-musl-0.11.0-dev.1869+df4cfc2ec/lib -I /home/ci/deps/zig+llvm+lld+clang-x86_64-linux-musl-0.11.0-dev.1869+df4cfc2ec/include --zig-lib-dir /home/ci/actions-runner5/_work/zig/zig/lib --listen=-
zig test Debug riscv64-linux-musl: error: Assertion failed: LC != RTLIB::UNKNOWN_LIBCALL && "Unexpected fp-to-sint conversion!" (/home/andy/dev/zig-bootstrap/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp: ExpandIntRes_FP_TO_SINT: 3433)
[...]
Expected Behavior
The problem seems to only happen on some architectures/configurations. The tests pass on my linux machine, but fail in CI.
Isn't this what https://github.com/ziglang/zig/pull/16089 fixed?
@nullptrdevs The CI failures in https://github.com/ziglang/zig/pull/16123 include the changes from #16089 , so there must be more to the story.