diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:39 +0000 |
commit | 1376c5a617be5c25655d0d7cb63e3beaa5a6e026 (patch) | |
tree | 3bb8d61aee02bc7a15eab3f36e3b921afc2075d0 /tests/run-make/issue-28595 | |
parent | Releasing progress-linux version 1.69.0+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.tar.xz rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.zip |
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/run-make/issue-28595')
-rw-r--r-- | tests/run-make/issue-28595/Makefile | 7 | ||||
-rw-r--r-- | tests/run-make/issue-28595/a.c | 1 | ||||
-rw-r--r-- | tests/run-make/issue-28595/a.rs | 6 | ||||
-rw-r--r-- | tests/run-make/issue-28595/b.c | 5 | ||||
-rw-r--r-- | tests/run-make/issue-28595/b.rs | 12 |
5 files changed, 31 insertions, 0 deletions
diff --git a/tests/run-make/issue-28595/Makefile b/tests/run-make/issue-28595/Makefile new file mode 100644 index 000000000..258f9788a --- /dev/null +++ b/tests/run-make/issue-28595/Makefile @@ -0,0 +1,7 @@ +# ignore-cross-compile +include ../tools.mk + +all: $(call NATIVE_STATICLIB,a) $(call NATIVE_STATICLIB,b) + $(RUSTC) a.rs + $(RUSTC) b.rs + $(call RUN,b) diff --git a/tests/run-make/issue-28595/a.c b/tests/run-make/issue-28595/a.c new file mode 100644 index 000000000..7bfd83cca --- /dev/null +++ b/tests/run-make/issue-28595/a.c @@ -0,0 +1 @@ +void a(void) {} diff --git a/tests/run-make/issue-28595/a.rs b/tests/run-make/issue-28595/a.rs new file mode 100644 index 000000000..07863cf64 --- /dev/null +++ b/tests/run-make/issue-28595/a.rs @@ -0,0 +1,6 @@ +#![crate_type = "rlib"] + +#[link(name = "a", kind = "static")] +extern "C" { + pub fn a(); +} diff --git a/tests/run-make/issue-28595/b.c b/tests/run-make/issue-28595/b.c new file mode 100644 index 000000000..6aecb5f9e --- /dev/null +++ b/tests/run-make/issue-28595/b.c @@ -0,0 +1,5 @@ +extern void a(void); + +void b(void) { + a(); +} diff --git a/tests/run-make/issue-28595/b.rs b/tests/run-make/issue-28595/b.rs new file mode 100644 index 000000000..1f389859f --- /dev/null +++ b/tests/run-make/issue-28595/b.rs @@ -0,0 +1,12 @@ +extern crate a; + +#[link(name = "b", kind = "static")] +extern "C" { + pub fn b(); +} + +fn main() { + unsafe { + b(); + } +} |