[Bug c++/85634] [8/9 Regression] ICE in tsubst_copy, at cp/pt.c:15483

2018-06-20 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85634

Nathan Sidwell  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #12 from Nathan Sidwell  ---
Regression caused by first patch fixed in r261817.

No regression on gcc-8 branch.

[Bug c++/85634] [8/9 Regression] ICE in tsubst_copy, at cp/pt.c:15483

2018-06-20 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85634

--- Comment #13 from Nathan Sidwell  ---
Author: nathan
Date: Wed Jun 20 19:22:53 2018
New Revision: 261817

URL: https://gcc.gnu.org/viewcvs?rev=261817=gcc=rev
Log:
[PR c++/85634] Fix tsubst ICE

https://gcc.gnu.org/ml/gcc-patches/2018-06/msg01274.html
PR c++/85634
* friend.c (add_friend): Keep lookup sets of tempate sets.

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

Added:
trunk/gcc/testsuite/g++.dg/lookup/pr85634-2.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/friend.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/85634] [8/9 Regression] ICE in tsubst_copy, at cp/pt.c:15483

2018-06-20 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85634

Nathan Sidwell  changed:

   What|Removed |Added

 Status|RESOLVED|ASSIGNED
 Resolution|FIXED   |---

--- Comment #11 from Nathan Sidwell  ---
Bah, there's another bug lurking in the original testcase ...

[Bug c++/85634] [8/9 Regression] ICE in tsubst_copy, at cp/pt.c:15483

2018-06-20 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85634

--- Comment #10 from Nathan Sidwell  ---
Author: nathan
Date: Wed Jun 20 16:54:44 2018
New Revision: 261814

URL: https://gcc.gnu.org/viewcvs?rev=261814=gcc=rev
Log:
[PR c++/85634] Fix tsubst ICE

https://gcc.gnu.org/ml/gcc-patches/2018-06/msg01269.html
PR c++/85634 - tsubst ICE on unmarked lookup
* parser.c (cp_parser_primary_expression): Keep lookup in template.

PR c++/85634 - tsubst ICE on unmarked lookup
* g++.dg/lookup/pr85634.C: New.

Added:
branches/gcc-8-branch/gcc/testsuite/g++.dg/lookup/pr85634.C
Modified:
branches/gcc-8-branch/gcc/cp/ChangeLog
branches/gcc-8-branch/gcc/cp/parser.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug c++/85634] [8/9 Regression] ICE in tsubst_copy, at cp/pt.c:15483

2018-06-20 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85634

Nathan Sidwell  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #9 from Nathan Sidwell  ---
Fixed gcc-8 r261814

[Bug c++/85634] [8/9 Regression] ICE in tsubst_copy, at cp/pt.c:15483

2018-06-20 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85634

--- Comment #7 from Nathan Sidwell  ---
Fixed trunk r261802

[Bug c++/85634] [8/9 Regression] ICE in tsubst_copy, at cp/pt.c:15483

2018-06-20 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85634

--- Comment #8 from Nathan Sidwell  ---
Author: nathan
Date: Wed Jun 20 14:34:06 2018
New Revision: 261802

URL: https://gcc.gnu.org/viewcvs?rev=261802=gcc=rev
Log:
[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.

Added:
trunk/gcc/testsuite/g++.dg/lookup/pr85634.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/decl.c
trunk/gcc/cp/init.c
trunk/gcc/cp/parser.c
trunk/gcc/cp/pt.c
trunk/gcc/cp/semantics.c
trunk/gcc/cp/tree.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/85634] [8/9 Regression] ICE in tsubst_copy, at cp/pt.c:15483

2018-06-06 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85634

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |nathan at gcc dot 
gnu.org

[Bug c++/85634] [8/9 Regression] ICE in tsubst_copy, at cp/pt.c:15483

2018-05-08 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85634

Jason Merrill  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org

--- Comment #6 from Jason Merrill  ---
Here in the template we initialize a pointer with a function name, which is
looked up to an overload set that never gets marked as persistent, which trips
the assert when we go to substitute that initializer.  Nathan, how should this
work?

[Bug c++/85634] [8/9 Regression] ICE in tsubst_copy, at cp/pt.c:15483

2018-05-04 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85634

Richard Biener  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
   Priority|P3  |P2
  Known to work||7.3.1
  Known to fail||8.1.0

[Bug c++/85634] [8/9 Regression] ICE in tsubst_copy, at cp/pt.c:15483

2018-05-03 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85634

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-05-03
   Target Milestone|--- |8.2
Summary|8.1 ICE in tsubst_copy, at  |[8/9 Regression] ICE in
   |cp/pt.c:15483   |tsubst_copy, at
   ||cp/pt.c:15483
 Ever confirmed|0   |1

--- Comment #5 from Marek Polacek  ---
Thanks.  Confirmed, started with r248250.