summaryrefslogtreecommitdiffstats
path: root/test/SemaCUDA/amdgpu-windows-vectorcall.cu
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCUDA/amdgpu-windows-vectorcall.cu')
-rw-r--r--test/SemaCUDA/amdgpu-windows-vectorcall.cu4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/SemaCUDA/amdgpu-windows-vectorcall.cu b/test/SemaCUDA/amdgpu-windows-vectorcall.cu
new file mode 100644
index 0000000000..7636572f69
--- /dev/null
+++ b/test/SemaCUDA/amdgpu-windows-vectorcall.cu
@@ -0,0 +1,4 @@
+// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -aux-triple x86_64-pc-windows-msvc -fms-compatibility -fcuda-is-device -fsyntax-only -verify %s
+
+__cdecl void hostf1();
+__vectorcall void (*hostf2)() = hostf1; // expected-error {{cannot initialize a variable of type 'void ((*))() __attribute__((vectorcall))' with an lvalue of type 'void () __attribute__((cdecl))'}}