* pt.c (unify) <case TEMPLATE_PARM_INDEX>: Check for invalid
parameters.
* g++.dg/template/crash53.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114885
138bc75d-0d04-0410-961f-
82ee72b054a4
2006-06-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+ PR c++/28110
+ * pt.c (unify) <case TEMPLATE_PARM_INDEX>: Check for invalid
+ parameters.
+
PR c++/28109
* rtti.c (get_tinfo_decl_dynamic): Robustify.
case TEMPLATE_PARM_INDEX:
tparm = TREE_VALUE (TREE_VEC_ELT (tparms, 0));
+ if (tparm == error_mark_node)
+ return 1;
if (TEMPLATE_PARM_LEVEL (parm)
!= template_decl_level (tparm))
2006-06-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+ PR c++/28110
+ * g++.dg/template/crash53.C: New test.
+
PR c++/28109
* g++.dg/rtti/incomplete1.C: New test.
--- /dev/null
+// PR c++/28110
+// { dg-do compile }
+
+template<int> struct A {};
+
+template<typename T> struct B
+{
+ template<T I> B(A<I>); // { dg-error "template constant parameter" }
+};
+
+B<double> a=A<0>(); // { dg-error "non-scalar type" }