This problem arose when I was trying to fix the issue presented on this rust issue page. Here is the source code:
fn main() {
let (a, b) = get_pair();
}
fn get_pair() -> (f64, f64) {
(0.0, 0.0)
}
When I try to compile the above code with SSE2 register disabled, the compilers built from source and rustup behave differently even when they are the same version.
d50032309@ptlaby31:~$ rust_install_temp/bin/rustc -C target-feature=-sse2 --allow warnings issue65844.rs # this is the rustc built from source
rustc: /home/d50032309/rust/src/llvm-project/llvm/lib/Target/X86/X86FloatingPoint.cpp:318: unsigned int getFPReg(const llvm::MachineOperand&): Assertion `Reg >= X86::FP0 && Reg <= X86::FP6 && "Expected FP register!"' failed.
Aborted (core dumped)
d50032309@ptlaby31:~$ .cargo/bin/rustc -C target-feature=-sse2 --allow warnings issue65844.rs # This is the same version of rustc, built from rustup
error: <unknown>:0:0: in function _ZN10issue658448get_pair17h1ac16997cb4aec1eE { double, double } (): SSE2 register return with SSE2 disabled
error: aborting due to previous error
In config.toml, I have set optimize=false and assertions=false, but the compiler still throws an assertion failure. What would be the problem here?