We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The code in https://github.com/bjoernQ/miscompile prints 26.608885 when compiled in release mode on 1.63.0.2 but prints 0.015625 when compiled in debug mode.
Also, on 1.63.0.1 (and 1.63) it prints the correct 26.608885 in debug and release mode.
The text was updated successfully, but these errors were encountered:
It is even reproducible with much less code:
... let foo = do_foo(3.14f64); let foo = foo as f32; println!("it is {}", foo); loop {} } #[inline(never)] fn do_foo(param: f64) -> f64 { param * 2f64 / 3f64 }
This gives me 2.020576 (this seems to change randomly) on 1.63.0.2 debug but the correct 2.0933332 in release - always correct for 1.63
If I change to #[inline(always)] it calculates the correct value
#[inline(always)]
Sorry, something went wrong.
This should now be fixed by the 1.64.0.0 release.
No branches or pull requests
The code in https://github.com/bjoernQ/miscompile prints 26.608885 when compiled in release mode on 1.63.0.2 but prints 0.015625 when compiled in debug mode.
Also, on 1.63.0.1 (and 1.63) it prints the correct 26.608885 in debug and release mode.
The text was updated successfully, but these errors were encountered: