http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57638
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu.org
--- Comment #1 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
Maybe this?
It works for this testcase, but haven't run the testsuite.
Index: pt.c
===================================================================
--- pt.c (revision 198545)
+++ pt.c (working copy)
@@ -16940,11 +16940,11 @@ unify (tree tparms, tree targs, tree par
else if (uses_template_parms (tparm))
/* We haven't deduced the type of this parameter yet. Try again
later. */
return unify_success (explain_p);
else
- return unify_type_mismatch (explain_p, tparm, arg);
+ return unify_type_mismatch (explain_p, tparm, TREE_TYPE (arg));
/* If ARG is a parameter pack or an expansion, we cannot unify
against it unless PARM is also a parameter pack. */
if ((template_parameter_pack_p (arg) || PACK_EXPANSION_P (arg))
&& !TEMPLATE_PARM_PARAMETER_PACK (parm))