about summary refs log tree commit diff
path: root/tests/ui/extern/extern-vectorcall.rs
blob: fb23c4cd5b54958d1891d1e6324b79887702a085 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//@ run-pass
//@ revisions: x64 x32
//@ [x64]only-x86_64
//@ [x32]only-x86
//@ [x32]compile-flags: -Ctarget-feature=+sse2

#![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);
}