diff options
| author | Oneirical <manchot@videotron.ca> | 2024-07-18 13:04:45 -0400 |
|---|---|---|
| committer | Oneirical <manchot@videotron.ca> | 2024-08-02 10:06:07 -0400 |
| commit | 5b44f800f37e0d3093aa5b89c10eb401bbc600eb (patch) | |
| tree | d3ec10296f157a07ba11b01a2c20bc54545badae /tests/run-make/cpp-global-destructors/foo.cpp | |
| parent | 8f641b1b953e04eefc0cede84af169088ebc1401 (diff) | |
| download | rust-5b44f800f37e0d3093aa5b89c10eb401bbc600eb.tar.gz rust-5b44f800f37e0d3093aa5b89c10eb401bbc600eb.zip | |
rewrite and rename issue-36710 to rmake
Diffstat (limited to 'tests/run-make/cpp-global-destructors/foo.cpp')
| -rw-r--r-- | tests/run-make/cpp-global-destructors/foo.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
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 <stdint.h> + +struct A { + A() { v = 1234; } + ~A() { v = 1; } + uint32_t v; +}; + +A a; + +extern "C" { + uint32_t get() { + return a.v; + } +} |
