Commit c043ee4a by Nathan Froyd Committed by Nathan Froyd

re PR c++/45049 (ICE: tree check: expected tree that contains 'decl minimal'…

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
parent 3ff91293
2010-08-18 Nathan Froyd <froydnj@codesourcery.com>
PR c++/45049
* name-lookup.c (push_overloaded_decl): Change DECL_CHAIN to
TREE_CHAIN.
2010-08-17 Kai Tietz <kai.tietz@onevision.com>
* class.c (note_name_declared_in_class): Make in 'extern "C"' blocks,
......
......@@ -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;
......
2010-08-18 Nathan Froyd <froydnj@codesourcery.com>
PR c++/45049
* g++.dg/pr45049-1.C: New test.
* g++.dg/pr45049-2.C: New test.
2010-08-18 Jie Zhang <jie@codesourcery.com>
* gcc.dg/builtin-apply2.c (STACK_ARGUMENTS_SIZE): Define to
......
/* { dg-do compile } */
namespace n1 {
void modf ();
}
namespace n2 {
void trunc ();
void modf ();
}
void max ()
{
using n1::modf;
using n2::trunc;
using n2::modf;
}
/* { dg-do compile } */
void foo()
{
void bar(int);
void baz(int);
void baz(void);
void bar(void);
}
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