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: r170824
This commit is contained in:
parent
bf6817f2c5
commit
3a8face47e
4 changed files with 23 additions and 0 deletions
|
@ -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-09 Martin Jambor <mjambor@suse.cz>
|
||||
|
||||
PR tree-optimization/47714
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2011-03-09 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* g++.dg/template/nontype22.C: New.
|
||||
|
||||
2011-03-09 Martin Jambor <mjambor@suse.cz>
|
||||
|
||||
PR tree-optimization/47714
|
||||
|
|
11
gcc/testsuite/g++.dg/template/nontype22.C
Normal file
11
gcc/testsuite/g++.dg/template/nontype22.C
Normal 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> &); // { dg-bogus "" "" { xfail *-*-* } }
|
||||
void g()
|
||||
{
|
||||
A<char> a;
|
||||
f(a);
|
||||
}
|
Loading…
Add table
Reference in a new issue