* g++.dg/template/unify2.C: New test.
authorRichard Sandiford <rsandifo@redhat.com>
Tue, 16 Oct 2001 13:09:17 +0000 (13:09 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 16 Oct 2001 13:09:17 +0000 (13:09 +0000)
From-SVN: r46288

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/unify2.C [new file with mode: 0644]

index a76fcbe6f88d53f658dc38043597d9c7bc40f97d..6a35de6024c139110de31a12ac33d3f8ab1372eb 100644 (file)
@@ -1,3 +1,7 @@
+2001-10-14  Richard Sandiford  <rsandifo@redhat.com>
+
+       * g++.dg/template/unify2.C: New test.
+
 2001-10-14  Richard Sandiford  <rsandifo@redhat.com>
 
        * g++.dg/other/exception-specification.C: New test
diff --git a/gcc/testsuite/g++.dg/template/unify2.C b/gcc/testsuite/g++.dg/template/unify2.C
new file mode 100644 (file)
index 0000000..e5e6d19
--- /dev/null
@@ -0,0 +1,13 @@
+// { dg-do compile }
+
+template<int I> void f1 (char [][I+1]) {}
+template<int I> void f2 (char [][I+0]) {}
+template<int I> void f3 (char [][I]) {}
+template<int I> void f4 (char [][I-0]) {}
+template<int I> void f5 (char [][I-1]) {}
+
+template void f1 (char [][6]); // { dg-error "does not match" }
+template void f2 (char [][6]); // { dg-error "does not match" }
+template void f3 (char [][6]);
+template void f4 (char [][6]); // { dg-error "does not match" }
+template void f5 (char [][6]); // { dg-error "does not match" }