]> gcc.gnu.org Git - gcc.git/commitdiff
re PR bootstrap/42347 (sched-deps.c:3840:1: internal compiler error: in fixup_reorder...
authorJakub Jelinek <jakub@redhat.com>
Mon, 17 May 2010 17:19:46 +0000 (19:19 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 17 May 2010 17:19:46 +0000 (19:19 +0200)
PR bootstrap/42347
* cfglayout.c (fixup_reorder_chain): Allow returnjump_p
to have no fallthru edge.

* gcc.c-torture/compile/pr42347.c: New test.

From-SVN: r159496

gcc/ChangeLog
gcc/cfglayout.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr42347.c [new file with mode: 0644]

index eeb5110118ac08b59b1e5883b0ec2a515f5d0ef0..87f27e7246b25e3d8933bfc4627c4d5fb0bfb4c5 100644 (file)
@@ -1,5 +1,9 @@
 2010-05-17  Jakub Jelinek  <jakub@redhat.com>
 
+       PR bootstrap/42347
+       * cfglayout.c (fixup_reorder_chain): Allow returnjump_p
+       to have no fallthru edge.
+
        PR middle-end/44102
        * cfgcleanup.c (try_optimize_cfg): When removing trivially empty
        bb with no successors, move footer whenever in IR_RTL_CFGLAYOUT
index 7ba289f1a58cede8010eecda7907f6a9bbb7d65d..5e120570b9a030fcd073e74582df4ed6a8b04256 100644 (file)
@@ -793,7 +793,8 @@ fixup_reorder_chain (void)
                 to prevent rtl_verify_flow_info from complaining.  */
              if (!e_fall)
                {
-                 gcc_assert (!onlyjump_p (bb_end_insn));
+                 gcc_assert (!onlyjump_p (bb_end_insn)
+                             || returnjump_p (bb_end_insn));
                  bb->il.rtl->footer = emit_barrier_after (bb_end_insn);
                  continue;
                }
index dfe8de74e4decc1effd1157c0ceaccda9c1df0d4..fcc6968b19db62cefbff43e997000c953ea558ce 100644 (file)
@@ -1,5 +1,8 @@
 2010-05-17  Jakub Jelinek  <jakub@redhat.com>
 
+       PR bootstrap/42347
+       * gcc.c-torture/compile/pr42347.c: New test.
+
        PR middle-end/44102
        * g++.dg/ext/asmgoto1.C: New test.
 
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr42347.c b/gcc/testsuite/gcc.c-torture/compile/pr42347.c
new file mode 100644 (file)
index 0000000..e98b869
--- /dev/null
@@ -0,0 +1,16 @@
+/* PR bootstrap/42347 */
+
+long
+foo (long x, long y)
+{
+  x = x & y;
+  switch (y)
+    {
+    case 63L: x >>= 0; break;
+    case 4032L: x >>= 6; break;
+    case 258048L: x >>= 12; break;
+    case 16515072L: x >>= 18; break;
+    default: __builtin_unreachable ();
+    }
+  return x;
+}
This page took 0.107098 seconds and 5 git commands to generate.