summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/deduct2.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/deduct2.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/deduct2.C21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/deduct2.C b/gcc/testsuite/g++.old-deja/g++.pt/deduct2.C
new file mode 100644
index 000000000..5501f363d
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/deduct2.C
@@ -0,0 +1,21 @@
+// { dg-do assemble }
+//
+// Copyright (C) 2000 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 5 Sept 2000 <nathan@codesourcery.com>
+
+// bug 79 & 59. We failed to tsubst non-type template parms which used
+// (previously deduced) type parms.
+
+struct C {};
+
+template< class T, T *G > struct S {};
+template< class T, T *G > void boz ( S<T,G> s1);
+
+C c1Gen;
+
+void foo ()
+{
+ S< C, &c1Gen > s1;
+
+ boz (s1);
+}