Skip to content

Commit 98dd81e

Browse files
chenyukangwesleywiser
authored andcommitted
Add test case for #109567
1 parent 47a4484 commit 98dd81e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// run-pass
2+
// check-run-results
3+
// regression test for issue #109567
4+
5+
fn f() -> f64 {
6+
std::hint::black_box(-1.0) % std::hint::black_box(-1.0)
7+
}
8+
9+
const G: f64 = -1.0 % -1.0;
10+
11+
pub fn main() {
12+
assert_eq!(-1, G.signum() as i32);
13+
assert_eq!((-0.0_f64).to_bits(), G.to_bits());
14+
assert_eq!(f().signum(), G.signum());
15+
}

0 commit comments

Comments
 (0)