about summary refs log tree commit diff
path: root/tests/run-make/extern-fn-explicit-align/rmake.rs
blob: fb153f92103b2ad17e02162511ea21a0f1d8f9f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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");
}