Commit 833be229 by Paolo Carlini Committed by Paolo Carlini

re PR c++/30535 (ICE with invalid template operator)

/cp
2007-07-08  Paolo Carlini  <pcarlini@suse.de>

	PR c++/30535
	* pt.c (unify): Never pass error_mark_node to template_decl_level.

/testsuite
2007-07-08  Paolo Carlini  <pcarlini@suse.de>

	PR c++/30535
	* g++.dg/template/operator10.C: New.

From-SVN: r126470
parent fb263f82
2007-07-08 Paolo Carlini <pcarlini@suse.de>
PR c++/30535
* pt.c (unify): Never pass error_mark_node to template_decl_level.
2007-07-07 Mark Mitchell <mark@codesourcery.com>
PR c++/32232
......
......@@ -12298,6 +12298,8 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict)
case TEMPLATE_TEMPLATE_PARM:
case BOUND_TEMPLATE_TEMPLATE_PARM:
tparm = TREE_VALUE (TREE_VEC_ELT (tparms, 0));
if (tparm == error_mark_node)
return 1;
if (TEMPLATE_TYPE_LEVEL (parm)
!= template_decl_level (tparm))
......
2007-07-08 Paolo Carlini <pcarlini@suse.de>
PR c++/30535
* g++.dg/template/operator10.C: New.
2007-07-08 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/32217
// PR c++/30535
struct A {};
template<A, typename T> int operator-(A, T); // { dg-error "not a valid type" }
int i = A() - 0; // { dg-error "no match" }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment