Skip to content

Commit 9c9f8a1

Browse files
committed
rewrite extern-fn-struct-passing-abi to rmake
1 parent e0229ec commit 9c9f8a1

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ run-make/extern-fn-explicit-align/Makefile
3131
run-make/extern-fn-generic/Makefile
3232
run-make/extern-fn-mangle/Makefile
3333
run-make/extern-fn-reachable/Makefile
34-
run-make/extern-fn-struct-passing-abi/Makefile
3534
run-make/extern-fn-with-packed-struct/Makefile
3635
run-make/extern-fn-with-union/Makefile
3736
run-make/extern-multiple-copies/Makefile

tests/run-make/extern-fn-struct-passing-abi/Makefile

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Functions with more than 6 arguments using foreign function interfaces (FFI) with C libraries
2+
// would have their arguments unexpectedly swapped, causing unexpected behaviour in Rust-C FFI
3+
// programs. This test compiles and executes Rust code with bulky functions of up to 7 arguments
4+
// and uses assertions to check for unexpected swaps.
5+
// See https://github.com/rust-lang/rust/issues/25594
6+
7+
//@ ignore-cross-compile
8+
// Reason: the compiled binary is executed
9+
10+
use run_make_support::{build_native_static_lib, run, rustc};
11+
12+
fn main() {
13+
build_native_static_lib("test");
14+
rustc().input("test.rs").run();
15+
run("test");
16+
}

0 commit comments

Comments
 (0)