This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix ICE with -Wduplicated-branches (PR c/79199)
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Marek Polacek <polacek at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 26 Jan 2017 13:23:42 +0100
- Subject: Re: Fix ICE with -Wduplicated-branches (PR c/79199)
- Authentication-results: sourceware.org; auth=none
- References: <20170126112102.GA6809@redhat.com> <CAFiYyc1i2d-v=JbSV+rdScSzehXB3AniF8ds3bNw=cS=_u4m7w@mail.gmail.com> <20170126122008.GG1867@tucnak>
On Thu, Jan 26, 2017 at 1:20 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Thu, Jan 26, 2017 at 01:17:03PM +0100, Richard Biener wrote:
>> On Thu, Jan 26, 2017 at 12:21 PM, Marek Polacek <polacek@redhat.com> wrote:
>> > This testcase was breaking because we found ourselves in operand_equal_p
>> > with a COND_EXPR whose operand 2 was null -- i.e., missing else branch,
>> > which won't happen for ? : but can happen here via -Wduplicated-branches.
>> >
>> > Bootstrapped/regtested on x86_64-linux, ok for trunk?
>>
>> I think NULL isn't really allowed, it has to be sth of void type instead.
>
> You mean void_node, right?
Yes.
>
> Jakub