re PR bootstrap/42347 (sched-deps.c:3840:1: internal compiler error: in fixup_reorder_chain, at cfglayout.c:796)

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
This commit is contained in:
Jakub Jelinek 2010-05-17 19:19:46 +02:00 committed by Jakub Jelinek
parent f1de5107b0
commit f145213fcc
4 changed files with 25 additions and 1 deletions

View 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

View 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;
}

View 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.

View File

@ -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;
}