* decl.c (decls_match): Assert that the arguments are decls.

From-SVN: r183100
This commit is contained in:
Jason Merrill 2012-01-11 11:47:12 -05:00 committed by Jason Merrill
parent 7bb37352be
commit 276fd9acf0
2 changed files with 4 additions and 0 deletions

View File

@ -1,5 +1,7 @@
2012-01-11 Jason Merrill <jason@redhat.com>
* decl.c (decls_match): Assert that the arguments are decls.
PR c++/51613
* pt.c (resolve_overloaded_unification): Compare types with
same_type_p, not decls_match.

View File

@ -952,6 +952,8 @@ decls_match (tree newdecl, tree olddecl)
interested in their types. */
return 0;
gcc_assert (DECL_P (newdecl));
if (TREE_CODE (newdecl) == FUNCTION_DECL)
{
tree f1 = TREE_TYPE (newdecl);