about summary refs log tree commit diff
path: root/tests/run-make/issue-36710/foo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run-make/issue-36710/foo.cpp')
-rw-r--r--tests/run-make/issue-36710/foo.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/run-make/issue-36710/foo.cpp b/tests/run-make/issue-36710/foo.cpp
new file mode 100644
index 00000000000..8f878c2c272
--- /dev/null
+++ b/tests/run-make/issue-36710/foo.cpp
@@ -0,0 +1,15 @@
+#include <stdint.h>
+
+struct A {
+    A() { v = 1234; }
+    ~A() { v = 1; }
+    uint32_t v;
+};
+
+A a;
+
+extern "C" {
+    uint32_t get() {
+        return a.v;
+    }
+}