Hi, I get an assert failure during a run of the selective scheduler. The problem is due to the implementation of maybe_tidy_empty_bb. Inside of it I see the following piece of code:
/* If it is possible - merge BB with its predecessor. */ if (can_merge_blocks_p (bb->prev_bb, bb)) sel_merge_blocks (bb->prev_bb, bb); During my compiler run I reach the situation in which bb->prev_bb is not in the scheduling scope BUT can_merge_blocks_p (bb->prev_bb, bb) returns true. As a consequence inside sel_remove_empty_bb I hit on the following assert: gcc_assert (in_current_region_p (merge_bb)); The backtrace from the assert is: #0 move_bb_info #1 sel_remove_empty_bb #2 sel_merge_blocks #3 maybe_tidy_empty_bb Perhaps one way to solve the problem is to replace: if (can_merge_blocks_p (bb->prev_bb, bb)) with if (can_merge_blocks_p (bb->prev_bb, bb) && in_current_region_p (bb->prev_bb)) I added this description to buggzila under Bug 53999. regards, Alex