[Bug c++/90138] [7/8/9 Regression] ICE on invalid in contains_struct_check()

2019-04-19 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90138

--- Comment #4 from Jakub Jelinek  ---
Author: jakub
Date: Fri Apr 19 11:57:23 2019
New Revision: 270456

URL: https://gcc.gnu.org/viewcvs?rev=270456=gcc=rev
Log:
PR c++/90138
* pt.c (process_template_parm): Set decl to pushdecl result.  If
!is_non_type, also set parm to that.

* g++.dg/template/pr90138.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/template/pr90138.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/90138] [7/8/9 Regression] ICE on invalid in contains_struct_check()

2019-04-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90138

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #3 from Jakub Jelinek  ---
Created attachment 46195
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46195=edit
gcc9-pr90138.patch

Untested fix.  If pushdecl finds a duplicate decl, it ggc_frees the passed in
decl, so better check the return value of pushdecl...

[Bug c++/90138] [7/8/9 Regression] ICE on invalid in contains_struct_check()

2019-04-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90138

Jakub Jelinek  changed:

   What|Removed |Added

   Priority|P3  |P4
   Target Milestone|--- |9.0
Summary|ICE on invalid in   |[7/8/9 Regression] ICE on
   |contains_struct_check() |invalid in
   ||contains_struct_check()

--- Comment #2 from Jakub Jelinek  ---
ICE started most likely with r117118 (r117114 was still ok).