https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88122
Jakub Jelinek <jakub at gcc dot gnu.org> 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 <jakub at gcc dot gnu.org> --- 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?