summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/explarg1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/explarg1.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/explarg1.C22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explarg1.C b/gcc/testsuite/g++.old-deja/g++.pt/explarg1.C
new file mode 100644
index 000000000..b78b483a2
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/explarg1.C
@@ -0,0 +1,22 @@
+// { dg-do run }
+// Bug: g++ generates an error trying to generate the first foo<int>, when
+// it should silently fail and go on to the next one.
+
+template<class T, typename U> class A { };
+
+template<class T> void
+foo(const A<T,typename T::N>&);
+
+template<typename T>
+class B { };
+
+template<typename T> void
+foo(B<T> const &) { }
+
+int
+main(void)
+{
+ B<int> sa;
+
+ foo<int> (sa);
+}