summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/memtemp78.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/memtemp78.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/memtemp78.C56
1 files changed, 56 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/memtemp78.C b/gcc/testsuite/g++.old-deja/g++.pt/memtemp78.C
new file mode 100644
index 000000000..73348351f
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/memtemp78.C
@@ -0,0 +1,56 @@
+// { dg-do assemble }
+
+struct A
+{
+ void f() {}
+
+ template <class U>
+ void f() {}
+};
+
+
+template <class T>
+struct B
+{
+ void f() {}
+
+ template <class U>
+ void f() {}
+};
+
+template struct B<int>;
+
+struct C
+{
+ template <class U>
+ void f() {} // { dg-error "with" } redeclaration
+
+ template <class U>
+ void f() {} // { dg-error "overloaded" } redeclaration
+};
+
+
+template <class T, class U>
+struct D
+{
+ void f(T);
+ void f(U);
+};
+
+template struct D<int, double>;
+
+template <class T, class U>
+struct D2
+{
+ void f(T); // { dg-error "with" } redeclaration
+ void f(U); // { dg-error "overloaded" } redeclaration
+};
+
+template struct D2<int, int>;
+
+struct E
+{
+ void f(); // { dg-error "with" } redeclaration
+ void f(); // { dg-error "overloaded" } redeclaration
+};
+