@@ -15688,6 +15688,9 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict)
return 1;
default:
+ /* An unresolved overload is a nondeduced context. */
+ if (type_unknown_p (parm))
+ return 0;
gcc_assert (EXPR_P (parm));
/* We must be looking at an expression. This can happen with
new file mode 100644
@@ -0,0 +1,11 @@
+// PR c++/44629
+// The proper mangling is unclear.
+
+template<typename T> int cmp1(T a, T b);
+template<typename T, int (*cmp)(T, T) = cmp1> struct A { };
+template <typename T> void f (A<T> &); // { dg-bogus "" "" { xfail *-*-* } }
+void g()
+{
+ A<char> a;
+ f(a);
+}