aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/name-lookup.c
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@codesourcery.com>2010-08-18 16:05:40 +0000
committerNathan Froyd <froydnj@gcc.gnu.org>2010-08-18 16:05:40 +0000
commitc043ee4a3aca9dab1b13808abce5de717eced450 (patch)
tree1b236ea0b57d049c968cfe54f950db94f793ef09 /gcc/cp/name-lookup.c
parent3ff91293eb19a5b6fa7fd47ca99b93d57d89570d (diff)
downloadgcc-c043ee4a3aca9dab1b13808abce5de717eced450.zip
gcc-c043ee4a3aca9dab1b13808abce5de717eced450.tar.gz
gcc-c043ee4a3aca9dab1b13808abce5de717eced450.tar.bz2
re PR c++/45049 (ICE: tree check: expected tree that contains 'decl minimal' structure, have 'tree_list' in push_overloaded_decl, at cp/name-lookup.c:2160)
gcc/cp/ PR c++/45049 * name-lookup.c (push_overloaded_decl): Change DECL_CHAIN to TREE_CHAIN. gcc/testsuite/ PR c++/45049 * g++.dg/pr45049-1.C: New test. * g++.dg/pr45049-2.C: New test. From-SVN: r163344
Diffstat (limited to 'gcc/cp/name-lookup.c')
-rw-r--r--gcc/cp/name-lookup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index 01f29e4..800e340 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -2157,7 +2157,7 @@ push_overloaded_decl (tree decl, int flags, bool is_friend)
for (d = &IDENTIFIER_BINDING (name)->scope->names;
*d;
- d = &DECL_CHAIN (*d))
+ d = &TREE_CHAIN (*d))
if (*d == old
|| (TREE_CODE (*d) == TREE_LIST
&& TREE_VALUE (*d) == old))
@@ -2168,7 +2168,7 @@ push_overloaded_decl (tree decl, int flags, bool is_friend)
else
/* Build a TREE_LIST to wrap the OVERLOAD. */
*d = tree_cons (NULL_TREE, new_binding,
- DECL_CHAIN (*d));
+ TREE_CHAIN (*d));
/* And update the cxx_binding node. */
IDENTIFIER_BINDING (name)->value = new_binding;