aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/template35.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/template35.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/template35.C15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template35.C b/gcc/testsuite/g++.old-deja/g++.jason/template35.C
new file mode 100644
index 00000000000..be3f808252c
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.jason/template35.C
@@ -0,0 +1,15 @@
+// Bug: instantiation of D() corrupts declaration of basis[].
+// Build don't link:
+
+struct B { };
+template <int t>
+struct D : public B
+{
+ D() : B () { }
+};
+
+B const * basis[] =
+{
+ new D<0>,
+ new D<1>,
+};