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

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Mar 1 16:45:00 GMT 2017


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
--- cprop.c.jj2 2017-02-13 22:55:30.000000000 +0100
+++ cprop.c     2017-03-01 17:36:36.123518656 +0100
@@ -1829,7 +1829,6 @@ one_cprop_pass (void)
                      EXIT_BLOCK_PTR_FOR_FN (cfun),
                      next_bb)
        {
-         bool seen_uncond_trap = false;
          rtx_insn *insn;

          /* Reset tables used to keep track of what's still valid [since
@@ -1852,13 +1851,10 @@ one_cprop_pass (void)
                if (! NOTE_P (insn) && ! insn->deleted ())
                  mark_oprs_set (insn);

-               if (!was_uncond_trap && !seen_uncond_trap
+               if (!was_uncond_trap
                    && GET_CODE (PATTERN (insn)) == TRAP_IF
                    && XEXP (PATTERN (insn), 0) == const1_rtx)
-                 {
-                   seen_uncond_trap = true;
-                   uncond_traps.safe_push (insn);
-                 }
+                 uncond_traps.safe_push (insn);
              }
        }

fixes the ICE for me.  I bet the reason for the seen_uncond_trap is that
further splitting of dead code doesn't buy us much.  So another alternative
would be to simply delete the second and further unconditional trap instead of
splitting it.


More information about the Gcc-bugs mailing list