[Bug rtl-optimization/78342] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2657 (error: flow control insn inside a basic block)

segher at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Nov 29 02:25:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78342

--- Comment #3 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Author: segher
Date: Tue Nov 29 02:02:45 2016
New Revision: 242947

URL: https://gcc.gnu.org/viewcvs?rev=242947&root=gcc&view=rev
Log:
combine: Make code after a new trap unreachable (PR78342)

Combine can turn a conditional trap into an unconditional trap.  If it
does that it should make the code after it unreachable (an unconditional
trap should be the last insn in its bb, and that bb has no successors).

This patch seems to work.  It is hard to be sure, this is very hard to
trigger.  Quite a few other passes look like they need something similar
as well, but I don't see anything else handling it yet either.


        PR rtl-optimization/78342
        * combine.c: Include "cfghooks.h".
        (try_combine): If we create an unconditional trap, break the basic
        block in two just after it, and remove the edge between; also, set
        the *new_direct_jump_p flag so that cleanup_cfg is run.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/combine.c


More information about the Gcc-bugs mailing list