From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20352 invoked by alias); 20 May 2013 13:16:06 -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 Received: (qmail 19830 invoked by uid 48); 20 May 2013 13:15:58 -0000 From: "steven at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/56950] compare-debug failure for gcc.dg/pr41345.c with fschedule-insns Date: Mon, 20 May 2013 13:16:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: build, wrong-debug X-Bugzilla-Severity: normal X-Bugzilla-Who: steven at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-05/txt/msg01309.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56950 --- Comment #5 from Steven Bosscher --- This patch makes the ICE go away, but it doesn't really solve the bug. The scheduler inserts (in this case) notes between basic blocks in the sched1 pass, which runs in cfglayout mode. But "between basic blocks" in cfglayout mode means nothing: such things belong in BB_HEADER and BB_FOOTER. But that happens before and after this patch, so the patch merely puts things back to the status ante quo. So be solved properly later... Index: haifa-sched.c =================================================================== --- haifa-sched.c (revision 199028) +++ haifa-sched.c (working copy) @@ -7442,11 +7442,12 @@ sched_extend_bb (void) if (NEXT_INSN (insn) == 0 || (!NOTE_P (insn) && !LABEL_P (insn) + && !DEBUG_INSN_P (insn) /* Don't emit a NOTE if it would end up before a BARRIER. */ && !BARRIER_P (NEXT_INSN (insn)))) { rtx note = emit_note_after (NOTE_INSN_DELETED, insn); - /* Make insn appear outside BB. */ + /* Make note appear outside BB. */ set_block_for_insn (note, NULL); BB_END (EXIT_BLOCK_PTR->prev_bb) = insn; }