[Bug c++/88122] [9 Regression] g++ ICE: internal compiler error: Segmentation fault

2019-01-08 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88122

--- Comment #7 from Jakub Jelinek  ---
Author: jakub
Date: Tue Jan  8 09:55:26 2019
New Revision: 267685

URL: https://gcc.gnu.org/viewcvs?rev=267685&root=gcc&view=rev
Log:
Backported from mainline
2018-11-21  Jakub Jelinek  

PR c++/88122
* method.c (maybe_explain_implicit_delete): If
FUNCTION_FIRST_USER_PARMTYPE (decl) is NULL, set const_p to false
instead of ICEing.

* g++.dg/cpp0x/implicit15.C: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/g++.dg/cpp0x/implicit15.C
Modified:
branches/gcc-8-branch/gcc/cp/ChangeLog
branches/gcc-8-branch/gcc/cp/method.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug c++/88122] [9 Regression] g++ ICE: internal compiler error: Segmentation fault

2018-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88122

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #6 from Jakub Jelinek  ---
Fixed.

[Bug c++/88122] [9 Regression] g++ ICE: internal compiler error: Segmentation fault

2018-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88122

--- Comment #5 from Jakub Jelinek  ---
Author: jakub
Date: Wed Nov 21 22:42:09 2018
New Revision: 266360

URL: https://gcc.gnu.org/viewcvs?rev=266360&root=gcc&view=rev
Log:
PR c++/88122
* method.c (maybe_explain_implicit_delete): If
FUNCTION_FIRST_USER_PARMTYPE (decl) is NULL, set const_p to false
instead of ICEing.

* g++.dg/cpp0x/implicit15.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/implicit15.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/method.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/88122] [9 Regression] g++ ICE: internal compiler error: Segmentation fault

2018-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88122

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #4 from Jakub Jelinek  ---
Created attachment 45056
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45056&action=edit
gcc9-pr88122.patch

Thus full patch I'm going to bootstrap/regtest.

[Bug c++/88122] [9 Regression] g++ ICE: internal compiler error: Segmentation fault

2018-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88122

--- Comment #3 from Jakub Jelinek  ---
Actually no, I think the const_p computation is ok, it is only relevant for
const vs. non-const copy ctor or const vs. non-const copy assignment, right?
So I think my patch is the right thing here.
E.g. copy_fn_p also returns 0 early if FUNCTION_FIRST_USER_PARMTYPE is NULL.

[Bug c++/88122] [9 Regression] g++ ICE: internal compiler error: Segmentation fault

2018-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88122

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-11-21
 CC||jason at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #2 from Jakub Jelinek  ---
This ICEs in maybe_explain_implicit_delete.
If the computation of const_p is correct (and it is ok we often compute it e.g.
from parm_type that is void_type for the argument termination), then
--- cp/method.c.jj  2018-11-16 10:22:18.668258171 +0100
+++ cp/method.c 2018-11-21 15:42:08.441785625 +0100
@@ -1821,8 +1821,12 @@ maybe_explain_implicit_delete (tree decl
   if (!informed)
{
  tree parms = FUNCTION_FIRST_USER_PARMTYPE (decl);
- tree parm_type = TREE_VALUE (parms);
- bool const_p = CP_TYPE_CONST_P (non_reference (parm_type));
+ bool const_p = false;
+ if (parms)
+   {
+ tree parm_type = TREE_VALUE (parms);
+ const_p = CP_TYPE_CONST_P (non_reference (parm_type));
+   }
  tree raises = NULL_TREE;
  bool deleted_p = false;
  tree scope = push_scope (ctype);
will do the job.  But I somehow think that const_p should be rather computed
from the this parameter if any, though of course that is just a wild guess.
Jason?

[Bug c++/88122] [9 Regression] g++ ICE: internal compiler error: Segmentation fault

2018-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88122

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek  ---
Started with r258003, before it has been rejected with:
pr88122.C:7:6: sorry, unimplemented: passing arguments to ellipsis of inherited
constructor ‘::(...) [inherited from a]’
now we get:
pr88122.C:7:6: error: use of deleted function ‘::(...) [inherited from a]’
+ ICE.

[Bug c++/88122] [9 Regression] g++ ICE: internal compiler error: Segmentation fault

2018-11-21 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88122

Richard Biener  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
Version|unknown |9.0
   Target Milestone|--- |9.0
Summary|g++ ICE: internal compiler  |[9 Regression] g++ ICE:
   |error: Segmentation fault   |internal compiler error:
   ||Segmentation fault