summaryrefslogtreecommitdiff
path: root/gcc/cp/name-lookup.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-21 16:11:19 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-21 16:11:19 +0000
commit11136a49422afd0aad4536b51e432e42f9bf7124 (patch)
treefcd7c1155ac6b92fbd524f1afac5e1b82b526168 /gcc/cp/name-lookup.c
parent1f3263152a2227a0d09b2e2f1db5e7b5d0d2b596 (diff)
downloadgcc-11136a49422afd0aad4536b51e432e42f9bf7124.tar.gz
* name-lookup.c (push_class_level_binding): Sanity check.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151931 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/name-lookup.c')
-rw-r--r--gcc/cp/name-lookup.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index 492850648b0..d37cf44d2d8 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -2751,6 +2751,9 @@ push_class_level_binding (tree name, tree x)
/* Check for invalid member names. */
gcc_assert (TYPE_BEING_DEFINED (current_class_type));
+ /* Check that we're pushing into the right binding level. */
+ gcc_assert (current_class_type == class_binding_level->this_entity);
+
/* We could have been passed a tree list if this is an ambiguous
declaration. If so, pull the declaration out because
check_template_shadow will not handle a TREE_LIST. */