diff options
Diffstat (limited to 'gdb/testsuite/gdb.cp/destrprint.cc')
-rw-r--r-- | gdb/testsuite/gdb.cp/destrprint.cc | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.cp/destrprint.cc b/gdb/testsuite/gdb.cp/destrprint.cc new file mode 100644 index 0000000..0def8e4 --- /dev/null +++ b/gdb/testsuite/gdb.cp/destrprint.cc @@ -0,0 +1,36 @@ + +class Base +{ +public: + int x, y; + + Base() : x(0), y(1) + { + } + + virtual ~Base() + { + // Break here. + } +}; + +class Derived : public Base +{ +public: + int z; + + Derived() : Base(), z(23) + { + } + + ~Derived() + { + } +}; + +int main() +{ + Derived d; + + return 0; +} |