aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/class.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r--gcc/cp/class.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index eaa109a..2a0351f 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -3010,11 +3010,10 @@ add_implicitly_declared_members (tree t, tree* access_decls,
{
tree using_decl = TREE_VALUE (*access_decls);
tree decl = USING_DECL_DECLS (using_decl);
- if (DECL_SELF_REFERENCE_P (decl))
+ if (DECL_NAME (using_decl) == ctor_identifier)
{
/* declare, then remove the decl */
- tree ctor_list = lookup_fnfields_slot (TREE_TYPE (decl),
- ctor_identifier);
+ tree ctor_list = decl;
location_t loc = input_location;
input_location = DECL_SOURCE_LOCATION (using_decl);
if (ctor_list)