This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ Patch] PR 71464 ("[6/7/8 Regression] ICE on invalid code (with redeclared constructor) at -Os: Segmentation fault")
- From: Jason Merrill <jason at redhat dot com>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 3 Mar 2018 08:22:37 -0500
- Subject: Re: [C++ Patch] PR 71464 ("[6/7/8 Regression] ICE on invalid code (with redeclared constructor) at -Os: Segmentation fault")
- Authentication-results: sourceware.org; auth=none
- References: <b670baa3-70d9-d47b-5988-e2a19eb9862e@oracle.com> <CADzB+2nhgEKkmr8g6KEdDo6re1pe9RxvOcq=Ay-RCMaw9X9swA@mail.gmail.com> <350eb6fe-7903-b2d6-c4e7-3d144200e4ae@oracle.com>
OK.
On Sat, Mar 3, 2018 at 4:50 AM, Paolo Carlini <paolo.carlini@oracle.com> wrote:
> Hi,
>
> On 03/03/2018 06:13, Jason Merrill wrote:
>>
>> On Fri, Mar 2, 2018 at 4:02 PM, Paolo Carlini <paolo.carlini@oracle.com>
>> wrote:
>>>
>>> this error recovery ICE happens only with -Os and is just a P5 - on the
>>> other hand I would argue the reproducer isn't that exotic! - but seems
>>> fixable easily and safely: cdtor_comdat_group immediately calls
>>> DECL_ASSEMBLER_NAME on both arguments and of course crashes if they are
>>> null. Tested x86_64-linux.
>>
>> It would make more sense to me to do this check and return right after
>> populate_clone_array.
>
> Oh nice. Then, given that the existing 'if (fns[0] && ...' looked a bit
> weird to me, to be super safe I also ran the the testsuite with 'gcc_assert
> (fns[0] && fns[1]);' and everything went well, it only triggered for the new
> testcase. Is the below OK?
>
> Thanks,
> Paolo.
>
> //////////////////////