From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7895 invoked by alias); 28 Sep 2010 13:23:23 -0000 Received: (qmail 7880 invoked by uid 22791); 28 Sep 2010 13:23:21 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,MISSING_MID,TW_CF,TW_QN 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, 28 Sep 2010 13:23:17 +0000 From: "abel at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/45570] [4.6 Regression] ICE: in cfg_preds_1, at sel-sched-ir.c:4584 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: 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: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.6.0 X-Bugzilla-Changed-Fields: Status Last reconfirmed date Ever Confirmed 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, 28 Sep 2010 16:20: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-09/txt/msg02996.txt.bz2 Message-ID: <20100928162000.jOko1UMbYusUMbQrEPQXxOtIgpAAlEbqGPQv_fE1k6w@z> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45570 Andrey Belevantsev changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2010.09.28 13:23:13 date| | Ever Confirmed|0 |1 --- Comment #3 from Andrey Belevantsev 2010-09-28 13:23:13 UTC --- Confirmed. It is hidden now by 163998. The problem is simple, yet again when inserting a bookkeeping code together with pipelining outer loops, we can see the situation when we need to devise a positive seqno for a bookkeeping insn, yet we can't do that by examining its neighbours. Fixed by relaxing the failing assert so that the first patch for PR40101 would provide an arbitrary positive value. diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c index 853205d..8a88c55 100644 --- a/gcc/sel-sched-ir.c +++ b/gcc/sel-sched-ir.c @@ -4580,8 +4580,12 @@ cfg_preds_1 (basic_block bb, insn_t **preds, int *n, int *size) basic_block pred_bb = e->src; insn_t bb_end = BB_END (pred_bb); - /* ??? This code is not supposed to walk out of a region. */ - gcc_assert (in_current_region_p (pred_bb)); + if (!in_current_region_p (pred_bb)) + { + gcc_assert (flag_sel_sched_pipelining_outer_loops + && current_loop_nest); + continue; + } if (sel_bb_empty_p (pred_bb)) cfg_preds_1 (pred_bb, preds, n, size); @@ -4594,7 +4598,9 @@ cfg_preds_1 (basic_block bb, insn_t **preds, int *n, int *size) } } - gcc_assert (*n != 0); + gcc_assert (*n != 0 + || (flag_sel_sched_pipelining_outer_loops + && current_loop_nest)); } /* Find all predecessors of BB and record them in PREDS and their number