Issues when emitting sjlj dispatch table

Richard Biener richard.guenther@gmail.com
Tue Sep 5 11:18:00 GMT 2017


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.

Richard.

> A test is attached, the error is visible for ARC backend, the option for the compiler should be -O2.
>
> Thanks,
> Claudiu



More information about the Gcc mailing list