Quoting the PR42388 audit trail:
The problem was that the failing assert is actually too strict, when an empty
block is removed, its predecessor could be outside the region. After fixing
this, we have also further robustified the function to expect empty blocks with
no succs or preds, as this problem showed itself yet another time via the
single failed test of the patch on ia64.
2009-12-30 Andrey Belevantsev <abel@ispras.ru>
PR rtl-optimization/42388
* sel-sched-ir.c (maybe_tidy_empty_bb): Do not delete empty blocks
that have no predecessors nor successors. Do not call move_bb_info
for empty blocks outside of current region.
* gcc.dg/pr42388.c: New.