new
authorJason Merrill <jason@gcc.gnu.org>
Tue, 9 Mar 1999 19:34:51 +0000 (14:34 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 9 Mar 1999 19:34:51 +0000 (14:34 -0500)
From-SVN: r25659

gcc/testsuite/g++.old-deja/g++.pt/overload12.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.old-deja/g++.pt/overload12.C b/gcc/testsuite/g++.old-deja/g++.pt/overload12.C
new file mode 100644 (file)
index 0000000..bf37bb6
--- /dev/null
@@ -0,0 +1,21 @@
+// Testcase for not trying a candidate that would generate an ill-formed
+// instantiation.
+
+template <int N> struct A {
+  int ar[N];
+};
+
+template <int N> struct B {
+  B () { };
+  B (const A<N> &) { };
+  B (const A<N-1> &, int);
+};
+
+int
+main ()
+{
+  A<1> a;
+  B<1> b1;
+  B<1> b2 (a);
+}
+