Skip to content

Commit 64916c9

Browse files
committed
also test fastcall
1 parent 39a69a9 commit 64916c9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/codegen/abi-win64-zst.rs

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//@ compile-flags: -Z merge-functions=disabled
2+
13
//@ revisions: linux
24
//@[linux] compile-flags: --target x86_64-unknown-linux-gnu
35
//@[linux] needs-llvm-components: x86
@@ -31,6 +33,12 @@ extern "sysv64" fn pass_zst_sysv64(_: ()) {}
3133
#[no_mangle]
3234
extern "vectorcall" fn pass_zst_vectorcall(_: ()) {}
3335

36+
// windows-gnu: define void @pass_zst_fastcall()
37+
// windows-msvc: define void @pass_zst_fastcall()
38+
#[no_mangle]
39+
#[cfg(windows)] // "fastcall" is not valid on 64bit Linux
40+
extern "fastcall" fn pass_zst_fastcall(_: ()) {}
41+
3442
// For `extern "C"` functions, ZST are *not* ignored on windows-gnu.
3543
// That's likely an accident on their side but the ABI is what it is.
3644

0 commit comments

Comments
 (0)