[PR c++/85634] Fix tsubst ICE
authorNathan Sidwell <nathan@acm.org>
Wed, 20 Jun 2018 14:34:06 +0000 (14:34 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Wed, 20 Jun 2018 14:34:06 +0000 (14:34 +0000)
commit335a120f7fc249992772fbabe5ad9375443a0848
tree7a82856f99119d29b694d297474a71289c1eb1ac
parentb54006ae92d9df52acfa6fdc2046fadb74cca446
[PR c++/85634] Fix tsubst ICE

https://gcc.gnu.org/ml/gcc-patches/2018-06/msg01237.html
PR c++/85634
* cp-tree.h (lookup_keep): Drop KEEP parm.
(lookup_list_keep): Delete.
(maybe_get_fns): Declare.
* parser.c (cp_parser_primary_expression): Call lookup_keep here.
(cp_parser_template_id): Not here ...
* decl.c (cp_finish_decl): ... nor here ...
* init.c (build_raw_new_expr): ... nor here ...
* pt.c (process_template_parm): ... nor here ...
* semantics.c (perform_koenig_lookup): Call lookup_keep.
(finish_call_expr): Not here.
* tree.c (ovl_cache): Delete.
(ovl_make, ovl_copy): No cache.
(lookup_keep): Always keep.
(lookup_list_keep): Delete.
(maybe_get_fns): New, broken out of ...
(get_fns): ... here.  Call it.
(built_min_nt_loc, build_min, build_min_non_dep): Drop lookup_keep.
(build_min_nt_call_vec): Likewise.

PR c++/85634
* g++.dg/lookup/pr85634.C: New.

From-SVN: r261802
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/init.c
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/cp/tree.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/lookup/pr85634.C [new file with mode: 0644]