Commit 276fd9ac by Jason Merrill Committed by Jason Merrill

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

From-SVN: r183100
parent 7bb37352
2012-01-11 Jason Merrill <jason@redhat.com> 2012-01-11 Jason Merrill <jason@redhat.com>
* decl.c (decls_match): Assert that the arguments are decls.
PR c++/51613 PR c++/51613
* pt.c (resolve_overloaded_unification): Compare types with * pt.c (resolve_overloaded_unification): Compare types with
same_type_p, not decls_match. same_type_p, not decls_match.
......
...@@ -952,6 +952,8 @@ decls_match (tree newdecl, tree olddecl) ...@@ -952,6 +952,8 @@ decls_match (tree newdecl, tree olddecl)
interested in their types. */ interested in their types. */
return 0; return 0;
gcc_assert (DECL_P (newdecl));
if (TREE_CODE (newdecl) == FUNCTION_DECL) if (TREE_CODE (newdecl) == FUNCTION_DECL)
{ {
tree f1 = TREE_TYPE (newdecl); tree f1 = TREE_TYPE (newdecl);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment