diff options
Diffstat (limited to 'gcc-4.9/libvtv/testsuite/libvtv.cc/derived-main.cpp')
-rw-r--r-- | gcc-4.9/libvtv/testsuite/libvtv.cc/derived-main.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc-4.9/libvtv/testsuite/libvtv.cc/derived-main.cpp b/gcc-4.9/libvtv/testsuite/libvtv.cc/derived-main.cpp new file mode 100644 index 000000000..0933ff696 --- /dev/null +++ b/gcc-4.9/libvtv/testsuite/libvtv.cc/derived-main.cpp @@ -0,0 +1,18 @@ +// { dg-do run } + +#include "lib.h" + +struct Derived: public Base +{ + virtual ~Derived() + { printf("In Derived destructor\n"); } +}; + +int main() +{ + Derived * d = new Derived; + Destroy(d); + Base * pp = GetPrivate(); + delete pp; // Virtual call #2 +} + |