summaryrefslogtreecommitdiffstats
path: root/tests/run-make/extern-fn-with-union/testcrate.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run-make/extern-fn-with-union/testcrate.rs')
-rw-r--r--tests/run-make/extern-fn-with-union/testcrate.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/run-make/extern-fn-with-union/testcrate.rs b/tests/run-make/extern-fn-with-union/testcrate.rs
new file mode 100644
index 000000000..28d91ff37
--- /dev/null
+++ b/tests/run-make/extern-fn-with-union/testcrate.rs
@@ -0,0 +1,11 @@
+#![crate_type = "lib"]
+
+#[repr(C)]
+pub struct TestUnion {
+ _val: u64,
+}
+
+#[link(name = "ctest", kind = "static")]
+extern "C" {
+ pub fn give_back(tu: TestUnion) -> u64;
+}