rust/tests/fail/intrinsics/simd-reduce-invalid-bool.rs
2022-07-11 11:48:56 +00:00

17 lines
333 B
Rust

#![feature(platform_intrinsics, repr_simd)]
extern "platform-intrinsic" {
pub(crate) fn simd_reduce_any<T>(x: T) -> bool;
}
#[repr(simd)]
#[allow(non_camel_case_types)]
struct i32x2(i32, i32);
fn main() {
unsafe {
let x = i32x2(0, 1);
simd_reduce_any(x); //~ERROR: must be all-0-bits or all-1-bits
}
}