diff options
author | Jason Merrill <jason@redhat.com> | 2012-01-11 11:46:57 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2012-01-11 11:46:57 -0500 |
commit | 7bb37352bed918f61a537596ea8097eb399b3883 (patch) | |
tree | 529f667258c06d8b12e1b98c6ee083196a1d37c6 /gcc/cp | |
parent | 145f71b5ecfaf5efca5689f0fa84b78a7c5c70be (diff) | |
download | gcc-7bb37352bed918f61a537596ea8097eb399b3883.zip gcc-7bb37352bed918f61a537596ea8097eb399b3883.tar.gz gcc-7bb37352bed918f61a537596ea8097eb399b3883.tar.bz2 |
re PR c++/51613 (Ambiguous function template instantiations as template argument are not rejected)
PR c++/51613
* pt.c (resolve_overloaded_unification): Compare types with
same_type_p, not decls_match.
From-SVN: r183099
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/pt.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 9b080fb..537d1aa 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2012-01-11 Jason Merrill <jason@redhat.com> + + PR c++/51613 + * pt.c (resolve_overloaded_unification): Compare types with + same_type_p, not decls_match. + 2012-01-10 Jason Merrill <jason@redhat.com> PR c++/51614 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index bc3dd97..ac72b6d 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -15471,7 +15471,7 @@ resolve_overloaded_unification (tree tparms, elem = tsubst (TREE_TYPE (fn), subargs, tf_none, NULL_TREE); if (try_one_overload (tparms, targs, tempargs, parm, elem, strict, sub_strict, addr_p, explain_p) - && (!goodfn || !decls_match (goodfn, elem))) + && (!goodfn || !same_type_p (goodfn, elem))) { goodfn = elem; ++good; |