Hello Toma,

On Thu, Feb 16, 2017 at 02:39:12PM +0000, Toma Tabacu wrote:
> It is caused by "gcc_assert (!JUMP_P (last))" in
> commit_one_edge_insertion (gcc/cfgrtl.c:2059-2077):
> 
>   if (returnjump_p (last))
>     {
>       /* ??? Remove all outgoing edges from BB and add one for EXIT.
>        This is not currently a problem because this only happens
>        for the (single) epilogue, which already has a fallthru edge
>        to EXIT.  */
> 
>       e = single_succ_edge (bb);
>       gcc_assert (e->dest == EXIT_BLOCK_PTR_FOR_FN (cfun)
>                 && single_succ_p (bb) && (e->flags & EDGE_FALLTHRU));
> 
>       e->flags &= ~EDGE_FALLTHRU;
>       emit_barrier_after (last);
> 
>       if (before)
>       delete_insn (before);
>     }
>   else
>     gcc_assert (!JUMP_P (last));

> I can't come up with a reason for this assert and this code hasn't been 
> touched
> in a long time, so I'm not sure it's necessary. It looks to me like it was
> added more out of habit rather than for a specific reason.

This happens when you have inserted code ending in a jump on an edge.
This then will need updating of the CFG, and this code does not know
how to do that.


Segher

Reply via email to