From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2556 invoked by alias); 23 Feb 2012 15:42:35 -0000 Received: (qmail 2542 invoked by uid 22791); 23 Feb 2012 15:42:32 -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, 23 Feb 2012 15:42:20 +0000 From: "bernds at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/52287] [4.7 regression] ICE in ready_remove_first, at haifa-sched.c:1927 Date: Thu, 23 Feb 2012 15:50:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: bernds at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ebotcazou at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.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 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: 2012-02/txt/msg02331.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52287 --- Comment #9 from Bernd Schmidt 2012-02-23 15:41:49 UTC --- (In reply to comment #8) > This reproduces only on Solaris 8 because the sort of the ready list isn't > stable in the presence of debug insns, given that rank_for_schedule isn't > anti-symmetrical: Thanks for investigating this. > Index: haifa-sched.c > =================================================================== > --- haifa-sched.c (revision 184352) > +++ haifa-sched.c (working copy) > @@ -1647,7 +1647,7 @@ rank_for_schedule (const void *x, const > /* Schedule debug insns as early as possible. */ > if (DEBUG_INSN_P (tmp) && !DEBUG_INSN_P (tmp2)) > return -1; > - else if (DEBUG_INSN_P (tmp2)) > + else if (DEBUG_INSN_P (tmp2) && !DEBUG_INSN_P (tmp)) > return 1; > } > > as it makes the sort stable and equivalent to the non-Solaris 8 case. Almost OK, but in the case of two debug insns, can you make it return the difference of the INSN_UIDs here? I'd rather not fall through into the other code for DEBUG_INSNs. Such a patch is preapproved.