aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2012-01-11 11:47:12 -0500
committerJason Merrill <jason@gcc.gnu.org>2012-01-11 11:47:12 -0500
commit276fd9acf007cc9e9251ca8808c7e1ff3a96d52e (patch)
tree134858f09533dc95988b5cd1fed273e82198301d /gcc
parent7bb37352bed918f61a537596ea8097eb399b3883 (diff)
downloadgcc-276fd9acf007cc9e9251ca8808c7e1ff3a96d52e.zip
gcc-276fd9acf007cc9e9251ca8808c7e1ff3a96d52e.tar.gz
gcc-276fd9acf007cc9e9251ca8808c7e1ff3a96d52e.tar.bz2
* decl.c (decls_match): Assert that the arguments are decls.
From-SVN: r183100
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog2
-rw-r--r--gcc/cp/decl.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 537d1aa..8893880 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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.
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 7daac5f..ef43dbf 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -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);