diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2020-06-20 13:23:31 +0200 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2020-06-20 13:23:31 +0200 |
| commit | ef4186a85b4c9bd94d258e3280cb239f26b8436e (patch) | |
| tree | d48388739b13f34557cfe74c01ccedc7945a7ad7 /example | |
| parent | 5c6bf836fe3d4cfda1b827a5cd3982e5a588c0ff (diff) | |
| download | rust-ef4186a85b4c9bd94d258e3280cb239f26b8436e.tar.gz rust-ef4186a85b4c9bd94d258e3280cb239f26b8436e.zip | |
Use Cranelift legalization for icmp.i128
The previous translation was wrong for signed 128bit comparisions This fixes several libcore tests
Diffstat (limited to 'example')
| -rw-r--r-- | example/std_example.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/example/std_example.rs b/example/std_example.rs index 530e5549b43..7038df874a4 100644 --- a/example/std_example.rs +++ b/example/std_example.rs @@ -81,6 +81,12 @@ fn main() { assert_eq!(houndred_f32 as i128, 100); assert_eq!(houndred_f64 as i128, 100); + // Test signed 128bit comparing + let max = usize::MAX as i128; + if 100i128 < 0i128 || 100i128 > max { + panic!(); + } + let _a = 1u32 << 2u8; let empty: [i32; 0] = []; |
