mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
rewrite extern-fn-explicit-align to rmake
This commit is contained in:
parent
205bfe7213
commit
bde91785dc
@ -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
|
||||
|
@ -1,6 +0,0 @@
|
||||
# ignore-cross-compile
|
||||
include ../tools.mk
|
||||
|
||||
all: $(call NATIVE_STATICLIB,test)
|
||||
$(RUSTC) test.rs
|
||||
$(call RUN,test) || exit 1
|
17
tests/run-make/extern-fn-explicit-align/rmake.rs
Normal file
17
tests/run-make/extern-fn-explicit-align/rmake.rs
Normal file
@ -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");
|
||||
}
|
Loading…
Reference in New Issue
Block a user