We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 41ff6a8 commit 313f04fCopy full SHA for 313f04f
tests/ui/numbers-arithmetic/issue-105626.rs
@@ -0,0 +1,17 @@
1
+// run-pass
2
+// only-x86
3
+// min-system-llvm-version: 16
4
+// compile-flags: -Ctarget-feature=+sse2
5
+
6
+use std::hint::black_box;
7
8
+fn main() {
9
+ let n: i64 = black_box(0x3fffffdfffffff);
10
+ let r = f32::from_bits(0x5a7fffff);
11
12
+ assert_ne!((n as f64) as f32, n as f32);
13
14
+ // FIXME: these assertions fail if only x87 is enabled
15
+ assert_eq!(n as i64 as f32, r);
16
+ assert_eq!(n as u64 as f32, r);
17
+}
0 commit comments