re PR c++/27961 (ICE on invalid template declaration)
authorLee Millward <lmillward@gcc.gnu.org>
Thu, 12 Oct 2006 20:06:36 +0000 (20:06 +0000)
committerLee Millward <lmillward@gcc.gnu.org>
Thu, 12 Oct 2006 20:06:36 +0000 (20:06 +0000)
PR c++/27961
* g++.dg/template/crash60.C: New test.

From-SVN: r117672

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

diff --git a/gcc/testsuite/g++.dg/template/crash60.C b/gcc/testsuite/g++.dg/template/crash60.C
new file mode 100644 (file)
index 0000000..9e1d88b
--- /dev/null
@@ -0,0 +1,9 @@
+//PR c++/27961
+
+struct A
+{
+    template<int> void foo(X);  // { dg-error "declared" }
+};
+
+template<int> void f()(0);      // { dg-error "initialized" }