]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR rtl-optimization/46875 (ICE: verify_flow_info failed: too many outgoi...
authorAndrey Belevantsev <abel@ispras.ru>
Thu, 7 Apr 2011 07:00:10 +0000 (11:00 +0400)
committerAndrey Belevantsev <abel@gcc.gnu.org>
Thu, 7 Apr 2011 07:00:10 +0000 (11:00 +0400)
        Backport from mainline
        2010-12-14  Alexander Monakov  <amonakov@ispras.ru>

        PR rtl-optimization/46875
        * sched-vis.c (print_pattern): Dump "sequence" for ADDR_VECs.
        * sel-sched-ir.c (bb_has_removable_jump_to_p): Forbid table jumps.

From-SVN: r172085

gcc/ChangeLog
gcc/sched-vis.c
gcc/sel-sched-ir.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr46875.c [new file with mode: 0644]

index 8311907c7295cb574442f35fec42294c6913d000..90f310ae051df292e1b2d471477b53e9e8dfb012 100644 (file)
@@ -1,3 +1,12 @@
+2011-04-07  Andrey Belevantsev  <abel@ispras.ru>
+
+       Backport from mainline
+       2010-12-14  Alexander Monakov  <amonakov@ispras.ru>
+
+       PR rtl-optimization/46875
+       * sched-vis.c (print_pattern): Dump "sequence" for ADDR_VECs.
+       * sel-sched-ir.c (bb_has_removable_jump_to_p): Forbid table jumps.
+
 2011-04-07  Andrey Belevantsev  <abel@ispras.ru>
 
        Backport from mainline
index 5754a56a5fa744860557b33f167d9d4cfb20d3ff..805b8cffbfbf6c19a68564c80986af9d37b43328 100644 (file)
@@ -600,7 +600,7 @@ print_pattern (char *buf, const_rtx x, int verbose)
       sprintf (buf, "asm {%s}", XSTR (x, 0));
       break;
     case ADDR_VEC:
-      break;
+      /* Fall through.  */
     case ADDR_DIFF_VEC:
       print_value (buf, XEXP (x, 0), verbose);
       break;
index 154b9e2d49dcd1d90a3387b1d308e361573a0e8c..4c3d94a73609f4c17c2b868f1823188a40611956 100644 (file)
@@ -6129,7 +6129,8 @@ sel_is_loop_preheader_p (basic_block bb)
 static bool
 bb_has_removable_jump_to_p (basic_block jump_bb, basic_block dest_bb)
 {
-  if (!onlyjump_p (BB_END (jump_bb)))
+  if (!onlyjump_p (BB_END (jump_bb))
+      || tablejump_p (BB_END (jump_bb), NULL, NULL))
     return false;
 
   /* Several outgoing edges, abnormal edge or destination of jump is
index d943dd376861ab5ef615f75948f4ab536cc3cd66..ea578fabf13175e24177ef958ac63bc66feaec70 100644 (file)
@@ -1,3 +1,11 @@
+2011-04-07  Andrey Belevantsev  <abel@ispras.ru>
+
+       Backport from mainline
+       2010-12-14  Alexander Monakov  <amonakov@ispras.ru>
+
+       PR rtl-optimization/46875
+       * gcc.dg/pr46875.c: New.
+
 2011-04-07  Andrey Belevantsev  <abel@ispras.ru>
 
        Backport from mainline
diff --git a/gcc/testsuite/gcc.dg/pr46875.c b/gcc/testsuite/gcc.dg/pr46875.c
new file mode 100644 (file)
index 0000000..c601708
--- /dev/null
@@ -0,0 +1,27 @@
+/* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
+/* { dg-options "-Os -fselective-scheduling2" } */
+
+long
+foo (int x, long *y)
+{
+  long a = 0;
+  switch (x)
+    {
+    case 0:
+      a = *y;
+      break;
+    case 1:
+      a = *y;
+      break;
+    case 2:
+      a = *y;
+      break;
+    case 3:
+      a = *y;
+      break;
+    case 4:
+      a = *y;
+      break;
+    }
+  return a;
+}