From 5b44f800f37e0d3093aa5b89c10eb401bbc600eb Mon Sep 17 00:00:00 2001 From: Oneirical Date: Thu, 18 Jul 2024 13:04:45 -0400 Subject: rewrite and rename issue-36710 to rmake --- tests/run-make/cpp-global-destructors/foo.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/run-make/cpp-global-destructors/foo.cpp (limited to 'tests/run-make/cpp-global-destructors/foo.cpp') diff --git a/tests/run-make/cpp-global-destructors/foo.cpp b/tests/run-make/cpp-global-destructors/foo.cpp new file mode 100644 index 00000000000..8f878c2c272 --- /dev/null +++ b/tests/run-make/cpp-global-destructors/foo.cpp @@ -0,0 +1,15 @@ +#include + +struct A { + A() { v = 1234; } + ~A() { v = 1; } + uint32_t v; +}; + +A a; + +extern "C" { + uint32_t get() { + return a.v; + } +} -- cgit 1.4.1-3-g733a5