This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/53999] New: failure in selective scheduler
- From: "aturjan at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 17 Jul 2012 15:19:58 +0000
- Subject: [Bug c/53999] New: failure in selective scheduler
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53999
Bug #: 53999
Summary: failure in selective scheduler
Classification: Unclassified
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: aturjan@yahoo.com
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))
Can somebody comment on this?