]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/intrinsics/bad-intrinsic-monomorphization.rs
3 #![feature(repr_simd, platform_intrinsics, core_intrinsics)]
5 #![crate_type = "rlib"]
7 // Bad monomorphizations could previously cause LLVM asserts even though the
8 // error was caught in the compiler.
10 extern "platform-intrinsic" {
11 fn simd_add
<T
>(x
: T
, y
: T
) -> T
;
16 #[derive(Copy, Clone)]
19 pub fn test_cttz(v
: Foo
) -> Foo
{
21 //~^ ERROR `cttz` intrinsic: expected basic integer type, found `Foo`
24 pub unsafe fn test_fadd_fast(a
: Foo
, b
: Foo
) -> Foo
{
25 intrinsics
::fadd_fast(a
, b
)
26 //~^ ERROR `fadd_fast` intrinsic: expected basic float type, found `Foo`
29 pub unsafe fn test_simd_add(a
: Foo
, b
: Foo
) -> Foo
{
31 //~^ ERROR `simd_add` intrinsic: expected SIMD input type, found non-SIMD `Foo`