Re: [PATCH] c: Fix -Wduplicated-branches ICE [PR97125]

2020-09-23 Thread Jakub Jelinek via Gcc-patches
On Sun, Sep 20, 2020 at 07:08:09PM -0400, Marek Polacek via Gcc-patches wrote: > We crash here because since r11-3302 the C FE uses codes like SWITCH_STMT > in the else branches in the attached test, and inchash::add_expr in > do_warn_duplicated_branches doesn't handle these front-end codes. In >

Re: [PATCH] c: Fix -Wduplicated-branches ICE [PR97125]

2020-09-23 Thread Marek Polacek via Gcc-patches
On Tue, Sep 22, 2020 at 08:18:09PM -0600, Sandra Loosemore wrote: > On 9/20/20 5:08 PM, Marek Polacek via Gcc-patches wrote: > > We crash here because since r11-3302 the C FE uses codes like SWITCH_STMT > > in the else branches in the attached test, and inchash::add_expr in > > do_warn_duplicated_b

Re: [PATCH] c: Fix -Wduplicated-branches ICE [PR97125]

2020-09-22 Thread Sandra Loosemore
On 9/20/20 5:08 PM, Marek Polacek via Gcc-patches wrote: We crash here because since r11-3302 the C FE uses codes like SWITCH_STMT in the else branches in the attached test, and inchash::add_expr in do_warn_duplicated_branches doesn't handle these front-end codes. In the C++ FE this works becaus

[PATCH] c: Fix -Wduplicated-branches ICE [PR97125]

2020-09-20 Thread Marek Polacek via Gcc-patches
We crash here because since r11-3302 the C FE uses codes like SWITCH_STMT in the else branches in the attached test, and inchash::add_expr in do_warn_duplicated_branches doesn't handle these front-end codes. In the C++ FE this works because by the time we get to do_warn_duplicated_branches we've a