diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt index 51614f84ec3..fde065b929b 100644 --- a/src/tools/tidy/src/allowed_run_make_makefiles.txt +++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt @@ -24,7 +24,6 @@ run-make/emit-to-stdout/Makefile run-make/export-executable-symbols/Makefile run-make/extern-diff-internal-name/Makefile run-make/extern-flag-disambiguates/Makefile -run-make/extern-fn-explicit-align/Makefile run-make/extern-fn-generic/Makefile run-make/extern-fn-mangle/Makefile run-make/extern-fn-reachable/Makefile diff --git a/tests/run-make/extern-fn-explicit-align/Makefile b/tests/run-make/extern-fn-explicit-align/Makefile deleted file mode 100644 index 3cbbf383996..00000000000 --- a/tests/run-make/extern-fn-explicit-align/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# ignore-cross-compile -include ../tools.mk - -all: $(call NATIVE_STATICLIB,test) - $(RUSTC) test.rs - $(call RUN,test) || exit 1 diff --git a/tests/run-make/extern-fn-explicit-align/rmake.rs b/tests/run-make/extern-fn-explicit-align/rmake.rs new file mode 100644 index 00000000000..fb153f92103 --- /dev/null +++ b/tests/run-make/extern-fn-explicit-align/rmake.rs @@ -0,0 +1,17 @@ +// The compiler's rules of alignment for indirectly passed values in a 16-byte aligned argument, +// in a C external function, used to be arbitrary. Unexpected behavior would occasionally occur +// and cause memory corruption. This was fixed in #112157, streamlining the way alignment occurs, +// and this test reproduces the case featured in the issue, checking that it compiles and executes +// successfully. +// See https://github.com/rust-lang/rust/issues/80127 + +//@ ignore-cross-compile +// Reason: the compiled binary is executed + +use run_make_support::{build_native_static_lib, run, rustc}; + +fn main() { + build_native_static_lib("test"); + rustc().input("test.rs").run(); + run("test"); +}