On 11/21/18 5:16 PM, Jakub Jelinek wrote:
Hi!

On the following testcase we ICE in maybe_explain_implicit_delete, because
FUNCTION_FIRST_USER_PARMTYPE (decl) is NULL - there are no user parameters
and ...
 From what I understood, const_p is used only in certain cases like const vs.
non-const copy constructor or assignment operator, if the sfk has no user
parameters, usually parm_type is just the void_type terminating the argument
list and also not really interesting for const_p computation.
So, this patch just arranges to pass false as const_p in this case.

Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

2018-11-21  Jakub Jelinek  <ja...@redhat.com>

        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.

OK.

Jason

Reply via email to