aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/template/virtual2.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/template/virtual2.C')
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/template/virtual2.C11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/template/virtual2.C b/gcc-4.9/gcc/testsuite/g++.dg/template/virtual2.C
new file mode 100644
index 000000000..83b7ed6be
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/template/virtual2.C
@@ -0,0 +1,11 @@
+// PR c++/51137
+
+struct A {};
+
+template<int> struct B : virtual A
+{
+ void foo()
+ {
+ (new A(*this))->A::~A();
+ }
+};