This is the mail archive of the
mailing list for the GCC project.
Re: Issues when emitting sjlj dispatch table
- From: Martin Liška <mliska at suse dot cz>
- To: Richard Biener <richard dot guenther at gmail dot com>, Claudiu Zissulescu <Claudiu dot Zissulescu at synopsys dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, Cupertino Miranda <Cupertino dot Miranda at synopsys dot com>, "Francois Bedard (Francois dot Bedard at synopsys dot com)" <Francois dot Bedard at synopsys dot com>
- Date: Tue, 12 Sep 2017 09:25:09 +0200
- Subject: Re: Issues when emitting sjlj dispatch table
- Authentication-results: sourceware.org; auth=none
- References: <098ECE41A0A6114BB2A07F1EC238DE8966633B69@de02wembxa.internal.synopsys.com> <CAFiYyc1Jkqgn8_iP=tapZjwj_JUsT0ss7EYny=LcS8Yub-FWbg@mail.gmail.com>
On 09/05/2017 01:18 PM, Richard Biener wrote:
> On Tue, Sep 5, 2017 at 12:20 PM, Claudiu Zissulescu
> <Claudiu.Zissulescu@synopsys.com> wrote:
>> Hi guys,
>> I found an ICE when emitting sjlj dispatch table for ARC. Namely, in sjlj_emit_dispatch_table() function, we create a dispatch table where the case elements are having the high value is set to NULL (except.c:1326). Later, these case statements are used by expand_sjlj_dispatch_table() (stmt.c:1006) where we create a case list requiring also the high element (stmt.c:1066). This leads to an error when we try to compute the high bounds in emit_case_dispatch_table() (stmt.c:786), due to the fact that high value is null.
>> In gcc7.x, we were initializing the high value of case elements in sjlj_emit_dispatch_table() with the CASE_LOW. Shouldn't we do the same thing, or do I miss something.
> A NULL CASE_HIGH means the case covers a single value, CASE_LOW.
> Probably broken by Martins reorg.
Yes, it's mine and probably dup of PR82154. I've got tested patch that will land soon in @gcc-patches.
>> A test is attached, the error is visible for ARC backend, the option for the compiler should be -O2.