aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@redhat.com>2001-10-16 13:09:17 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2001-10-16 13:09:17 +0000
commit756b2d5ef5c8e18cf61ab632afb10502fd6904dd (patch)
tree5fb2d0f9fff4d5b07f939e4341bfe10917504253 /gcc/testsuite
parentd9f818d95c59cae78c94283bc277e77876cd25f7 (diff)
downloadgcc-756b2d5ef5c8e18cf61ab632afb10502fd6904dd.zip
gcc-756b2d5ef5c8e18cf61ab632afb10502fd6904dd.tar.gz
gcc-756b2d5ef5c8e18cf61ab632afb10502fd6904dd.tar.bz2
* g++.dg/template/unify2.C: New test.
From-SVN: r46288
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/g++.dg/template/unify2.C13
2 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index a76fcbe..6a35de6 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,9 @@
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
2001-10-13 Tom Rix <trix@redhat.com>
diff --git a/gcc/testsuite/g++.dg/template/unify2.C b/gcc/testsuite/g++.dg/template/unify2.C
new file mode 100644
index 0000000..e5e6d19
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/unify2.C
@@ -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" }