[PR c++/84426] ICE after conflicting member decl
authorNathan Sidwell <nathan@acm.org>
Tue, 27 Feb 2018 20:52:15 +0000 (20:52 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Tue, 27 Feb 2018 20:52:15 +0000 (20:52 +0000)
commit10b5c9829b7e162342e8e730b6ed072bcd0dc7b2
treed4a3fcaa4ea60a66ebc04d0669d289cb6662db27
parent7f7e718d9cfeab9a3ee4aea4dd2d9d565462c185
[PR c++/84426] ICE after conflicting member decl

https://gcc.gnu.org/ml/gcc-patches/2018-02/msg01529.html
PR c++/84426
* name-lookup.h (get_member_slot): Rename ...
(find_member_slot): ... here.
(add_member_slot): New.
* name-lookup.c (member_vec_linear_search): No need to check for
NULL slot.
(get_member_slot): Rename ...
(find_member_slot): ... here.  Don't add slot for incomplete class.
(add_member_slot): New.
* class.c (add_method): Adjust get_member_slot rename.  Bail out
if push_class_level_binding fails.  Create slot and grok
properties once we're committed to insertion.

PR c++/84426
* g++.dg/lookup/pr84426.C: New.

From-SVN: r258042
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/name-lookup.c
gcc/cp/name-lookup.h
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/lookup/pr84426.C [new file with mode: 0644]