aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/libvtv/testsuite/libvtv.cc/derived-lib.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/libvtv/testsuite/libvtv.cc/derived-lib.cpp')
-rw-r--r--gcc-4.9/libvtv/testsuite/libvtv.cc/derived-lib.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc-4.9/libvtv/testsuite/libvtv.cc/derived-lib.cpp b/gcc-4.9/libvtv/testsuite/libvtv.cc/derived-lib.cpp
new file mode 100644
index 000000000..375dbe41b
--- /dev/null
+++ b/gcc-4.9/libvtv/testsuite/libvtv.cc/derived-lib.cpp
@@ -0,0 +1,18 @@
+#include "lib.h"
+
+struct Derived_Private : public Base
+{
+ virtual ~Derived_Private()
+ { printf("in Derived_Private destructor\n"); }
+};
+
+Base * GetPrivate()
+{
+ return new Derived_Private();
+}
+
+void Destroy(Base * pb)
+{
+ delete pb; // Virtual call #1
+}
+