r10-7815-gaa576f2a860c82 added special hashing for TEMPLATE_TEMPLATE_PARM
to work around non-lowered ttps having TYPE_CANONICAL set but lowered
ttps did not. But ever since
r13-737-gd0ef9e06197d14 this is no longer
the case, and all ttps should now have TYPE_CANONICAL set. So this
special hashing is now unnecessary and we can fall back to always using
TYPE_CANONICAL.
gcc/cp/ChangeLog:
* pt.cc (iterative_hash_template_arg): Don't hash
TEMPLATE_TEMPLATE_PARM specially.
return hash_tmpl_and_args (TI_TEMPLATE (ti), TI_ARGS (ti));
}
- switch (TREE_CODE (arg))
+ switch (code)
{
- case TEMPLATE_TEMPLATE_PARM:
- {
- tree tpi = TEMPLATE_TYPE_PARM_INDEX (arg);
-
- /* Do not recurse with TPI directly, as that is unbounded
- recursion. */
- val = iterative_hash_object (TEMPLATE_PARM_LEVEL (tpi), val);
- val = iterative_hash_object (TEMPLATE_PARM_IDX (tpi), val);
- }
- break;
-
case DECLTYPE_TYPE:
val = iterative_hash_template_arg (DECLTYPE_TYPE_EXPR (arg), val);
break;