Commit 5aeb7348 by Jason Merrill Committed by Jason Merrill

re PR c++/55261 ([C++0x] ICE (SIGSEGV) when inheriting implicit constructor)

	PR c++/55261
	* class.c (add_implicitly_declared_members): Use
	lookup_fnfields_slot to get the base constructors.

From-SVN: r193621
parent abcc192b
2012-11-19 Jason Merrill <jason@redhat.com>
PR c++/55261
* class.c (add_implicitly_declared_members): Use
lookup_fnfields_slot to get the base constructors.
2012-11-19 Jakub Jelinek <jakub@redhat.com> 2012-11-19 Jakub Jelinek <jakub@redhat.com>
PR middle-end/54630 PR middle-end/54630
......
...@@ -3014,7 +3014,8 @@ add_implicitly_declared_members (tree t, tree* access_decls, ...@@ -3014,7 +3014,8 @@ add_implicitly_declared_members (tree t, tree* access_decls,
if (DECL_SELF_REFERENCE_P (decl)) if (DECL_SELF_REFERENCE_P (decl))
{ {
/* declare, then remove the decl */ /* declare, then remove the decl */
tree ctor_list = CLASSTYPE_CONSTRUCTORS (TREE_TYPE (decl)); tree ctor_list = lookup_fnfields_slot (TREE_TYPE (decl),
ctor_identifier);
location_t loc = input_location; location_t loc = input_location;
input_location = DECL_SOURCE_LOCATION (using_decl); input_location = DECL_SOURCE_LOCATION (using_decl);
if (ctor_list) if (ctor_list)
......
// PR c++/55261
// { dg-options -std=c++11 }
struct A
{
};
struct B : A
{
using A::A;
};
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