We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7c7fc0 commit c0f7251Copy full SHA for c0f7251
tests/compile-fail/intrinsics/simd-div-overflow.rs
@@ -0,0 +1,15 @@
1
+#![feature(platform_intrinsics, repr_simd)]
2
+
3
+extern "platform-intrinsic" {
4
+ pub(crate) fn simd_div<T>(x: T, y: T) -> T;
5
+}
6
7
+#[repr(simd)]
8
+#[allow(non_camel_case_types)]
9
+struct i32x2(i32, i32);
10
11
+fn main() { unsafe {
12
+ let x = i32x2(1, i32::MIN);
13
+ let y = i32x2(1, -1);
14
+ simd_div(x, y); //~ERROR Undefined Behavior: overflow in signed division
15
+} }
0 commit comments