summaryrefslogtreecommitdiffstats
path: root/tests/run-make-fulldeps/longjmp-across-rust
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:39 +0000
commit1376c5a617be5c25655d0d7cb63e3beaa5a6e026 (patch)
tree3bb8d61aee02bc7a15eab3f36e3b921afc2075d0 /tests/run-make-fulldeps/longjmp-across-rust
parentReleasing progress-linux version 1.69.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-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-fulldeps/longjmp-across-rust')
-rw-r--r--tests/run-make-fulldeps/longjmp-across-rust/Makefile5
-rw-r--r--tests/run-make-fulldeps/longjmp-across-rust/foo.c18
-rw-r--r--tests/run-make-fulldeps/longjmp-across-rust/main.rs29
3 files changed, 0 insertions, 52 deletions
diff --git a/tests/run-make-fulldeps/longjmp-across-rust/Makefile b/tests/run-make-fulldeps/longjmp-across-rust/Makefile
deleted file mode 100644
index 848638d82..000000000
--- a/tests/run-make-fulldeps/longjmp-across-rust/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-include ../tools.mk
-
-all: $(call NATIVE_STATICLIB,foo)
- $(RUSTC) main.rs
- $(call RUN,main)
diff --git a/tests/run-make-fulldeps/longjmp-across-rust/foo.c b/tests/run-make-fulldeps/longjmp-across-rust/foo.c
deleted file mode 100644
index bd71cc4d7..000000000
--- a/tests/run-make-fulldeps/longjmp-across-rust/foo.c
+++ /dev/null
@@ -1,18 +0,0 @@
-#include <assert.h>
-#include <setjmp.h>
-
-static jmp_buf ENV;
-
-extern void test_middle();
-
-void test_start(void(*f)()) {
- if (setjmp(ENV) != 0)
- return;
- f();
- assert(0);
-}
-
-void test_end() {
- longjmp(ENV, 1);
- assert(0);
-}
diff --git a/tests/run-make-fulldeps/longjmp-across-rust/main.rs b/tests/run-make-fulldeps/longjmp-across-rust/main.rs
deleted file mode 100644
index cc1d5b126..000000000
--- a/tests/run-make-fulldeps/longjmp-across-rust/main.rs
+++ /dev/null
@@ -1,29 +0,0 @@
-#[link(name = "foo", kind = "static")]
-extern "C" {
- fn test_start(f: extern "C" fn());
- fn test_end();
-}
-
-fn main() {
- unsafe {
- test_start(test_middle);
- }
-}
-
-struct A;
-
-impl Drop for A {
- fn drop(&mut self) {}
-}
-
-extern "C" fn test_middle() {
- let _a = A;
- foo();
-}
-
-fn foo() {
- let _a = A;
- unsafe {
- test_end();
- }
-}