diff options
author | Nathan Sidwell <nathan@acm.org> | 2018-06-20 14:34:06 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2018-06-20 14:34:06 +0000 |
commit | 335a120f7fc249992772fbabe5ad9375443a0848 (patch) | |
tree | 7a82856f99119d29b694d297474a71289c1eb1ac /gcc/cp/init.c | |
parent | b54006ae92d9df52acfa6fdc2046fadb74cca446 (diff) | |
download | gcc-335a120f7fc249992772fbabe5ad9375443a0848.zip gcc-335a120f7fc249992772fbabe5ad9375443a0848.tar.gz gcc-335a120f7fc249992772fbabe5ad9375443a0848.tar.bz2 |
[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
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r-- | gcc/cp/init.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 57697d6..810a776 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -2403,12 +2403,7 @@ build_raw_new_expr (vec<tree, va_gc> *placement, tree type, tree nelts, else if (init->is_empty ()) init_list = void_node; else - { - init_list = build_tree_list_vec (init); - for (tree v = init_list; v; v = TREE_CHAIN (v)) - if (TREE_CODE (TREE_VALUE (v)) == OVERLOAD) - lookup_keep (TREE_VALUE (v), true); - } + init_list = build_tree_list_vec (init); new_expr = build4 (NEW_EXPR, build_pointer_type (type), build_tree_list_vec (placement), type, nelts, |