diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a76fcbe6f88..6a35de6024c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2001-10-14 Richard Sandiford + + * g++.dg/template/unify2.C: New test. + 2001-10-14 Richard Sandiford * 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 index 00000000000..e5e6d190468 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/unify2.C @@ -0,0 +1,13 @@ +// { dg-do compile } + +template void f1 (char [][I+1]) {} +template void f2 (char [][I+0]) {} +template void f3 (char [][I]) {} +template void f4 (char [][I-0]) {} +template 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" }