re PR rtl-optimization/46875 (ICE: verify_flow_info failed: too many outgoing branch...
authorAlexander Monakov <amonakov@gcc.gnu.org>
Tue, 14 Dec 2010 12:43:47 +0000 (15:43 +0300)
committerAlexander Monakov <amonakov@gcc.gnu.org>
Tue, 14 Dec 2010 12:43:47 +0000 (15:43 +0300)
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.

testsuite:
* gcc.dg/pr46875.c: New.

From-SVN: r167794

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 8d03fce20f330f6320f6d1eb8ac381efd41a0643..78ca0480a21a4c02a65174960f333a5ad2adefc7 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2010-12-14  Kaushik Phatak <kaushik.phatak@kpitcummins.com>
 
        * config/h8300/h8300.md (define_split) : Add condition for
index 83c423a967082e79ac63209ea22d9287fc5f59a8..d4a5644f6c7ef12f65e4dc80e4062b3207bb2b22 100644 (file)
@@ -604,7 +604,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 e1c687641840c50f192dc48b2241f12fbd4a7e4c..468dfd7a3e6d6b3f0ba528cb2936a261176eb675 100644 (file)
@@ -6148,7 +6148,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 bbf4627780f457f7e9b23750dc93ab8cf72d4cde..33be340e9bbb5f4fd6dd5f4fcf9bc7ba75dfe8b4 100644 (file)
@@ -1,4 +1,9 @@
-2010-12-04  Jan Hubicka  <jh@suse.cz>
+2010-12-14  Alexander Monakov  <amonakov@ispras.ru>
+
+       PR rtl-optimization/46875
+       * gcc.dg/pr46875.c: New.
+
+2010-12-14  Jan Hubicka  <jh@suse.cz>
 
        * g++.dg/other/first-global.C: Update regexp to match new
        names of ctors.
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;
+}