rust/tests/compile-fail/intrinsics/simd-reduce-invalid-bool.rs

15 lines
316 B
Rust
Raw Normal View History

2022-02-21 20:41:52 -06:00
#![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
} }