We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 44c6999 commit 797ebf5Copy full SHA for 797ebf5
tests/ui/const_prop/issue-102403.rs
@@ -0,0 +1,15 @@
1
+// run-pass
2
+// compile-flags: -O -Zmir-opt-level=3 -Cno-prepopulate-passes
3
+
4
+// Regression test for a broken MIR optimization.
5
+pub fn f() -> f64 {
6
+ std::hint::black_box(-1.0) % std::hint::black_box(-1.0)
7
+}
8
9
+pub fn g() -> f64 {
10
+ -1.0 % -1.0
11
12
13
+pub fn main() {
14
+ assert_eq!(f().signum(), g().signum());
15
tests/ui/const_prop/issue-113407.rs
@@ -0,0 +1,8 @@
+ let f = f64::from_bits(0x19873cc2) as f32;
+ assert_eq!(f.to_bits(), 0);
0 commit comments