summaryrefslogtreecommitdiffstats
path: root/src/test/run-make-fulldeps/foreign-double-unwind/foo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/run-make-fulldeps/foreign-double-unwind/foo.cpp')
-rw-r--r--src/test/run-make-fulldeps/foreign-double-unwind/foo.cpp33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/test/run-make-fulldeps/foreign-double-unwind/foo.cpp b/src/test/run-make-fulldeps/foreign-double-unwind/foo.cpp
deleted file mode 100644
index 69a8f11c2..000000000
--- a/src/test/run-make-fulldeps/foreign-double-unwind/foo.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <cstdio>
-#include <exception>
-
-void println(const char* s) {
- puts(s);
- fflush(stdout);
-}
-
-struct outer_exception {};
-struct inner_exception {};
-
-extern "C" {
- void throw_cxx_exception() {
- if (std::uncaught_exception()) {
- println("throwing inner C++ exception");
- throw inner_exception();
- } else {
- println("throwing outer C++ exception");
- throw outer_exception();
- }
- }
-
- void cxx_catch_callback(void (*cb)()) {
- try {
- cb();
- println("unreachable: callback returns");
- } catch (outer_exception) {
- println("unreachable: caught outer exception in catch (...)");
- } catch (inner_exception) {
- println("unreachable: caught inner exception in catch (...)");
- }
- }
-}