From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31440 invoked by alias); 7 Apr 2011 07:46:07 -0000 Received: (qmail 31432 invoked by uid 22791); 7 Apr 2011 07:46:07 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 07 Apr 2011 07:46:02 +0000 From: "abel at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/48374] ICE: in single_succ_edge, at basic-block.h:562 with -fselective-scheduling2 and __builtin_unreachable() X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: abel at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: abel at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Status Last reconfirmed CC AssignedTo Ever Confirmed Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Thu, 07 Apr 2011 07:46:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-04/txt/msg00674.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48374 Andrey Belevantsev changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2011.04.07 07:45:54 CC| |abel at gcc dot gnu.org AssignedTo|unassigned at gcc dot |abel at gcc dot gnu.org |gnu.org | Ever Confirmed|0 |1 --- Comment #1 from Andrey Belevantsev 2011-04-07 07:45:54 UTC --- Confirmed, yet another case when we don't expect a block with zero successors. The following fixes the problem. Btw, --param max-sched-extend-regions-iters=2 is enough to reproduce the bug. Zdenek, for most functions you don't want more than two iterations (you can see the comment in sched-rgn.c:1248, so in your experiments you can limit it to not more than 5-10. You actually need a positive value for the region extension code to fire though. diff --git a/gcc/sel-sched-ir.h b/gcc/sel-sched-ir.h index 5516da9..13af1b5 100644 --- a/gcc/sel-sched-ir.h +++ b/gcc/sel-sched-ir.h @@ -1119,7 +1119,8 @@ get_all_loop_exits (basic_block bb) /* If bb is empty, and we're skipping to loop exits, then consider bb as a possible gate to the inner loop now. */ while (sel_bb_empty_or_nop_p (bb) - && in_current_region_p (bb)) + && in_current_region_p (bb) + && EDGE_COUNT (bb->succs) > 0) { bb = single_succ (bb);