summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/memtemp26.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/memtemp26.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/memtemp26.C28
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/memtemp26.C b/gcc/testsuite/g++.old-deja/g++.pt/memtemp26.C
new file mode 100644
index 000000000..3eb5f287d
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/memtemp26.C
@@ -0,0 +1,28 @@
+// { dg-do link }
+// GROUPS passed templates membertemplates
+extern "C" int printf(const char*, ...);
+
+template <class X>
+struct S
+{
+ template <class U>
+ void f(U u);
+
+ int i[4];
+};
+
+
+template <class X>
+template <class U>
+void S<X>::f(U u)
+{
+ printf ("%d\n", sizeof (U));
+}
+
+
+int main()
+{
+ S<char*> s;
+ s.f(3);
+ s.f(s);
+}