re PR c++/20463 (ICE on using undefined type)
authorPaolo Carlini <pcarlini@suse.de>
Fri, 18 Mar 2005 17:19:42 +0000 (17:19 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 18 Mar 2005 17:19:42 +0000 (17:19 +0000)
2005-03-18  Paolo Carlini  <pcarlini@suse.de>

PR c++/20463
* g++.dg/template/crash35.C: New test.

From-SVN: r96690

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

index 4a0f85fc34405d5d305ed9a7e1e056ad0e6fc05b..861304d12d08ec24345688a7c11f1d8cc85af6b2 100644 (file)
@@ -1,3 +1,8 @@
+2005-03-18  Paolo Carlini  <pcarlini@suse.de>
+
+       PR c++/20463
+       * g++.dg/template/crash35.C: New test.
+
 2005-03-17  Paolo Carlini  <pcarlini@suse.de>
 
        PR c++/19966
diff --git a/gcc/testsuite/g++.dg/template/crash35.C b/gcc/testsuite/g++.dg/template/crash35.C
new file mode 100644 (file)
index 0000000..dd8aa2f
--- /dev/null
@@ -0,0 +1,9 @@
+// PR c++/20463
+// { dg-do compile }
+
+template <typename T> struct C; // { dg-error "declaration" }
+
+template <typename T> void C<T>::f() // { dg-error "invalid|template" }
+{
+  const foo bar; // { dg-error "name a type" }
+}