* decl.c (decls_match): Assert that the arguments are decls.
authorJason Merrill <jason@redhat.com>
Wed, 11 Jan 2012 16:47:12 +0000 (11:47 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 11 Jan 2012 16:47:12 +0000 (11:47 -0500)
From-SVN: r183100

gcc/cp/ChangeLog
gcc/cp/decl.c

index 537d1aa54731d9a02ea4109b33d75dc072533ce4..8893880b2c29c7268415b8fa00b41e272b943bb0 100644 (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.
index 7daac5feff480d81093b09f80c53175504e338cd..ef43dbf86ee27183cce2d9368da5f1b6b38ac46d 100644 (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);