about summary refs log tree commit diff
path: root/tests/ui/abi/vectorcall-abi-checks.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/abi/vectorcall-abi-checks.rs')
-rw-r--r--tests/ui/abi/vectorcall-abi-checks.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/ui/abi/vectorcall-abi-checks.rs b/tests/ui/abi/vectorcall-abi-checks.rs
new file mode 100644
index 00000000000..d83bbffa745
--- /dev/null
+++ b/tests/ui/abi/vectorcall-abi-checks.rs
@@ -0,0 +1,21 @@
+//@ add-core-stubs
+//@ compile-flags: --crate-type=rlib --target=i586-unknown-linux-gnu -C target-feature=-sse,-sse2
+//@ build-fail
+//@ ignore-pass (test emits codegen-time errors)
+//@ needs-llvm-components: x86
+#![feature(no_core, abi_vectorcall)]
+#![no_core]
+
+extern crate minicore;
+use minicore::*;
+
+#[no_mangle]
+pub extern "vectorcall" fn f() {
+    //~^ ABI "vectorcall" which requires the `sse2` target feature
+}
+
+#[no_mangle]
+pub fn call_site() {
+    f();
+    //~^ ABI "vectorcall" which requires the `sse2` target feature
+}