'gcc-3_3-branch'.
From-SVN: r76561
--- /dev/null
+// { dg-do compile }
+
+// Origin: Ivan Godard <igodard@pacbell.net>
+// Volker Reichelt <reichelt@gcc.gnu.org>
+
+// PR c++/13797: ICE invalid nontype template parameter
+
+template <int> struct A
+{
+ typedef A<0> B; // { dg-error "not a valid type|conflict" }
+ template <B> struct B {}; // { dg-error "not a valid type|declaration" }
+};
+
+A<0> a; // { dg-error "instantiated" }
--- /dev/null
+// { dg-do compile }
+
+// Origin: Ivan Godard <igodard@pacbell.net>
+// Volker Reichelt <reichelt@gcc.gnu.org>
+
+// PR c++/13797: ICE invalid nontype template parameter
+
+template <int> struct A
+{
+ typedef A<0> B;
+ template <B> struct C {}; // { dg-error "not a valid type" }
+};
+
+A<0> a; // { dg-error "instantiated" }