Fix build of ppv-lite86 on s390x
On s390x, rustc seems to miscompile rotate_right on u128 in debug mode.
This is used in a testcase, which makes the test fail.
Fortunately, it's only used for the expected value in an assert_eq!, so
it's not really an error in the library.
By putting the value into a const, the compiler calculates the value
correctly, fixing the test case.
Jan Niehusmann
3 years ago
|
0 |
rust-ppv-lite86 (0.2.6-2) UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO; urgency=medium
|
|
1 |
|
|
2 |
* Team upload.
|
|
3 |
* Fix build on s390x. (Closes: #961335)
|
|
4 |
|
|
5 |
-- Jan Niehusmann <jan@debian.org> Sat, 28 Nov 2020 23:18:40 +0100
|
|
6 |
|
0 | 7 |
rust-ppv-lite86 (0.2.6-1) unstable; urgency=medium
|
1 | 8 |
|
2 | 9 |
* Package ppv-lite86 0.2.6 from crates.io using debcargo 2.4.2
|
|
0 |
Index: ppv-lite86/src/generic.rs
|
|
1 |
===================================================================
|
|
2 |
--- ppv-lite86.orig/src/generic.rs
|
|
3 |
+++ ppv-lite86/src/generic.rs
|
|
4 |
@@ -326,7 +326,8 @@ fn rotate_u128_right(x: u128, i: u32) ->
|
|
5 |
#[test]
|
|
6 |
fn test_rotate_u128() {
|
|
7 |
const X: u128 = 0x0001_0203_0405_0607_0809_0a0b_0c0d_0e0f;
|
|
8 |
- assert_eq!(rotate_u128_right(X, 17), X.rotate_right(17));
|
|
9 |
+ const R: u128 = X.rotate_right(17);
|
|
10 |
+ assert_eq!(rotate_u128_right(X, 17), R);
|
|
11 |
}
|
|
12 |
|
|
13 |
impl RotateEachWord32 for u128x1_generic {
|
|
0 |
fix_build_on_s390x.diff
|