[Bug tree-optimization/71916] [6/7 Regression] ICE at -O3 on valid code on x86_64-linux-gnu in "maybe_record_trace_start"
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jul 19 14:42:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71916
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The following patch fixes this:
--- gcc/cfgrtl.c.jj 2016-05-11 15:15:49.000000000 +0200
+++ gcc/cfgrtl.c 2016-07-19 16:38:20.362303955 +0200
@@ -574,8 +574,10 @@ contains_no_active_insn_p (const_basic_b
{
rtx_insn *insn;
- if (bb == EXIT_BLOCK_PTR_FOR_FN (cfun) || bb == ENTRY_BLOCK_PTR_FOR_FN
(cfun)
- || !single_succ_p (bb))
+ if (bb == EXIT_BLOCK_PTR_FOR_FN (cfun)
+ || bb == ENTRY_BLOCK_PTR_FOR_FN (cfun)
+ || !single_succ_p (bb)
+ || (single_succ_edge (bb)->flags & EDGE_FAKE) != 0)
return false;
for (insn = BB_HEAD (bb); insn != BB_END (bb); insn = NEXT_INSN (insn))
Normally, empty bbs that fall through into nowhere aren't considered as
forwarders, because those require single_succ_p. But if there are fake edges
added, this doesn't work anymore.
More information about the Gcc-bugs
mailing list