On Tue, Aug 28, 2018 at 9:11 AM Martin Liška <mli...@suse.cz> wrote:
>
> On 08/27/2018 05:21 PM, Richard Biener wrote:
> > On Mon, Aug 27, 2018 at 4:05 PM Martin Liška <mli...@suse.cz> wrote:
> >>
> >> Hi.
> >>
> >> Now we should not meet a degenerated gswitch statements.
> >>
> >> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
> >>
> >> Ready to be installed?
> >
> > Hum.  This relies on us doing CFG cleanup.  Do we really want
> > find_taken_edge to ICE when called between CFG construction
> > and the first such call?  That is, I think this kind of "verification"
> > belongs in the CFG verifier.  Note that there's GIMPLE switches
> > before we have a CFG and those are not sanitized (at least
> > not that I know of).  So we cannot really declare single-case
> > switch stmts invalid?
>
> Thanks for explanation. In case of switch_conversion::expand, may I apply
> patch for that? It should not see a degenerated switch, or do I miss
> something?

Hopefully not.

So that part is OK.

Richard.

> Martin
>
> >
> > Thanks,
> > Richard.
> >
> >> Martin
> >>
> >> gcc/ChangeLog:
> >>
> >> 2018-08-27  Martin Liska  <mli...@suse.cz>
> >>
> >>         * tree-cfg.c (find_taken_edge_switch_expr): Replace not possible
> >>         condition with assert.
> >>         * tree-switch-conversion.c (switch_conversion::expand):
> >>         Likewise.
> >> ---
> >>  gcc/tree-cfg.c               | 17 +++++++----------
> >>  gcc/tree-switch-conversion.c |  9 +--------
> >>  2 files changed, 8 insertions(+), 18 deletions(-)
> >>
> >>
>

Reply via email to