Skip to content

Commit c84f1b7

Browse files
Add a test
1 parent 6994ee3 commit c84f1b7

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#![crate_type = "cdylib"]
2+
3+
#[no_mangle]
4+
pub extern "C" fn foo(a: i32, b: i32) -> i32 {
5+
1
6+
}
7+
8+
#[export_name = "?bar@@YAXXZ"]
9+
pub extern "C" fn bar(a: i32, b: i32) -> i32 {
10+
2
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// This test verifies that functions including a leading question mark
2+
// in their export_name attribute successfully compile.
3+
// This is only an issue on Windows 32-bit.
4+
5+
use run_make_support::{run, run_fail, rustc};
6+
7+
fn main() {
8+
rustc().input("main.rs").target("i686-pc-windows-msvc").run();
9+
}

0 commit comments

Comments
 (0)