rust/tests/ui/extern/extern-vectorcall.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
427 B
Rust
Raw Normal View History

//@ run-pass
//@ revisions: x64 x32
//@ [x64]only-x86_64
//@ [x32]only-x86
//@ [x32]compile-flags: -Ctarget-feature=+sse2
2016-10-25 17:56:36 +00:00
#![feature(abi_vectorcall)]
trait A {
extern "vectorcall" fn test1(i: i32);
}
struct S;
impl A for S {
extern "vectorcall" fn test1(i: i32) {
assert_eq!(i, 1);
}
}
extern "vectorcall" fn test2(i: i32) {
assert_eq!(i, 2);
}
fn main() {
<S as A>::test1(1);
test2(2);
}