akldc opened issue #11012:
.clifTest Casetest optimize set opt_level=none set preserve_frame_pointers=true set enable_multi_ret_implicit_sret=true function %main() -> i32 fast { block0(): v2 = iconst.i32 0 v16 = srem v2, v2 return v16 } ; print: %main()Run this test case on four architectures.
[x86 ] Floating point exception return code: -8 [aarch64] qemu: uncaught target signal 4 (Illegal instruction) - core dumped [aarch64] Illegal instruction return code: -4 [riscv64] Illegal instruction return code: -4 [s390x ] qemu: uncaught target signal 8 (Floating point exception) - core dumped [s390x ] Illegal instruction return code: -8When running
sremwith operands 0 and 0, the error types and return values are inconsistent among the four architectures.
akldc added the bug label to Issue #11012.
akldc added the cranelift label to Issue #11012.
bjorn3 commented on issue #11012:
This is expected. On some architectures division by zero emits SIGFPE, on others SIGILL.
akldc commented on issue #11012:
@bjorn3
Ok,thanks
akldc closed issue #11012:
.clifTest Casetest optimize set opt_level=none set preserve_frame_pointers=true set enable_multi_ret_implicit_sret=true function %main() -> i32 fast { block0(): v2 = iconst.i32 0 v16 = srem v2, v2 return v16 } ; print: %main()Run this test case on four architectures.
[x86 ] Floating point exception return code: -8 [aarch64] qemu: uncaught target signal 4 (Illegal instruction) - core dumped [aarch64] Illegal instruction return code: -4 [riscv64] Illegal instruction return code: -4 [s390x ] qemu: uncaught target signal 8 (Floating point exception) - core dumped [s390x ] Illegal instruction return code: -8When running
sremwith operands 0 and 0, the error types and return values are inconsistent among the four architectures.
Last updated: Jan 09 2026 at 13:15 UTC