[Bug tree-optimization/60979] [4.9/4.10 Regression] ICE: in gimple_redirect_edge_and_branch_force, at tree-cfg.c:5544, w/ -O -ftree-loop-linear or -fgraphite-identity

2014-04-28 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60979

--- Comment #2 from Richard Biener  ---
create_single_exit_edge uses make_forwarder_block which doesn't really do
things
in a way that works for incoming abnormal edges.

I can fix it by constraining SCOP detection.

Index: gcc/graphite-scop-detection.c
===
--- gcc/graphite-scop-detection.c   (revision 209849)
+++ gcc/graphite-scop-detection.c   (working copy)
@@ -474,8 +474,10 @@ scopdet_basic_block_info (basic_block bb
   result.exits = false;

   /* Mark bbs terminating a SESE region difficult, if they start
-a condition.  */
-  if (!single_succ_p (bb))
+a condition or if the block it exits to cannot be split
+with make_forwarder_block.  */
+  if (!single_succ_p (bb)
+ || bb_has_abnormal_pred (single_succ (bb)))
result.difficult = true;
   else
result.exit = single_succ (bb);


[Bug tree-optimization/60979] [4.9/4.10 Regression] ICE: in gimple_redirect_edge_and_branch_force, at tree-cfg.c:5544, w/ -O -ftree-loop-linear or -fgraphite-identity

2014-04-28 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60979

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2014-04-28
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
   Target Milestone|--- |4.9.1
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
Confirmed.  I will have a look.