From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14521 invoked by alias); 14 Dec 2010 14:39:11 -0000 Received: (qmail 14471 invoked by uid 22791); 14 Dec 2010 14:39:09 -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; Tue, 14 Dec 2010 14:39:05 +0000 From: "amonakov at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/46649] [4.6 Regression] ICE: in move_bb_info, at sel-sched-ir.c:5080 with -fschedule-insns -fselective-scheduling 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: amonakov at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: amonakov at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.6.0 X-Bugzilla-Changed-Fields: 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: Tue, 14 Dec 2010 14:39: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: 2010-12/txt/msg01602.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46649 --- Comment #7 from Alexander Monakov 2010-12-14 14:38:38 UTC --- After a discussion with Andrey and refreshing my memory on that code I think it's actually better to unbreak purge_empty_blocks in this case. It used to be correct, i.e. it never attempted to delete the first BB in the region; then I broke it because I wasn't aware of the limitation w.r.t. removal of the first BB. Sorry for the spam. diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c index 427fd22..9f0c4a3 100644 --- a/gcc/sel-sched-ir.c +++ b/gcc/sel-sched-ir.c @@ -3749,10 +3749,10 @@ tidy_control_flow (basic_block xbb, bool full_tidying) void purge_empty_blocks (void) { - /* Do not attempt to delete preheader. */ - int i = sel_is_loop_preheader_p (BASIC_BLOCK (BB_TO_BLOCK (0))) ? 1 : 0; + int i; - while (i < current_nr_blocks) + /* Do not attempt to delete the first basic block in the region. */ + for (i = 1; i < current_nr_blocks; i++) { basic_block b = BASIC_BLOCK (BB_TO_BLOCK (i));