[PR c++/84602] ICE with anon-struct
authorNathan Sidwell <nathan@gcc.gnu.org>
Wed, 28 Feb 2018 12:32:10 +0000 (12:32 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Wed, 28 Feb 2018 12:32:10 +0000 (12:32 +0000)
commit35129fd3a745403bec0a06d62b18fc30ce1bbf8e
tree52c83de64c58004608085231c1e4d9857b64ad3e
parent6030f6fe258b81f2e3a8952ef3162772bb6e684e
[PR c++/84602] ICE with anon-struct

https://gcc.gnu.org/ml/gcc-patches/2018-02/msg01577.html
PR c++/84602
* name-lookup.h (search_anon_aggr): Add defaulted WANT_TYPE arg.
* name-lookup.c (fields_linear_search): Look in an anon-aggr
regardless of want_type.
(search_anon_aggr): Just use get_class_binding_direct.

PR c++/84602
* g++.dg/lookup/pr84602.C: New.

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