diff options
Diffstat (limited to 'testsuite/tests/rts/linker/T20494-obj.cpp')
-rw-r--r-- | testsuite/tests/rts/linker/T20494-obj.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/testsuite/tests/rts/linker/T20494-obj.cpp b/testsuite/tests/rts/linker/T20494-obj.cpp new file mode 100644 index 0000000000..d0cc52704a --- /dev/null +++ b/testsuite/tests/rts/linker/T20494-obj.cpp @@ -0,0 +1,22 @@ +#include <cstdio> + +class A { +public: + const char *msg; + A(const char *msg) { + printf("constr %s\n", msg); + this->msg = msg; + } + + ~A() { + printf("destroy %s\n", this->msg); + } +}; + +A a("helloA"); +A b("helloB"); + +int main() { + printf("main\n"); + return 0; +} |