aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
authorPaolo Carlini <pcarlini@suse.de>2007-07-08 22:41:12 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2007-07-08 22:41:12 +0000
commit833be2294da78c26dfe3ca259b155bee1fe86ac2 (patch)
tree7f9f50ac990065f64cad084edb0900da79c82167 /gcc/cp/pt.c
parentfb263f821cdab4e9237c4a321f959ac9e3704686 (diff)
downloadgcc-833be2294da78c26dfe3ca259b155bee1fe86ac2.zip
gcc-833be2294da78c26dfe3ca259b155bee1fe86ac2.tar.gz
gcc-833be2294da78c26dfe3ca259b155bee1fe86ac2.tar.bz2
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
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 06e94e7..38a4c09 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -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))