re PR c++/44629 (ICE in unify, at cp/pt.c:15155)

PR c++/44629
	* pt.c (unify): An unresolved overload is a nondeduced context.

From-SVN: r170825
This commit is contained in:
Jason Merrill 2011-03-09 12:57:48 -05:00 committed by Jason Merrill
parent 1c37c75b3f
commit 186dd96cfa
4 changed files with 23 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2011-03-09 Jason Merrill <jason@redhat.com>
PR c++/44629
* pt.c (unify): An unresolved overload is a nondeduced context.
2011-03-08 Jason Merrill <jason@redhat.com>
PR c++/45651

View File

@ -14125,6 +14125,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

View File

@ -1,3 +1,7 @@
2011-03-09 Jason Merrill <jason@redhat.com>
* g++.dg/template/nontype22.C: New.
2011-03-08 Jason Merrill <jason@redhat.com>
* g++.dg/template/anon5.C: New.

View File

@ -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> &);
void g()
{
A<char> a;
f(a); // { dg-bogus "" "" { xfail *-*-* } }
}