From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12338 invoked by alias); 30 Nov 2012 13:54:40 -0000 Received: (qmail 12186 invoked by uid 48); 30 Nov 2012 13:54:12 -0000 From: "steven at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/48549] [4.6/4.7 Regression] Combiner ICE with -g Date: Fri, 30 Nov 2012 13:54:00 -0000 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: steven at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.6.1 X-Bugzilla-Changed-Fields: CC 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-11/txt/msg03004.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48549 Steven Bosscher changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |steven at gcc dot gnu.org --- Comment #7 from Steven Bosscher 2012-11-30 13:54:10 UTC --- A patch to get rid of BARRIERs runs into this one. Here's an alternative fix: Index: combine.c =================================================================== --- combine.c (revision 193989) +++ combine.c (working copy) @@ -1223,11 +1223,10 @@ combine_instructions (rtx f, unsigned int nregs) if (NONDEBUG_INSN_P (insn)) { while (last_combined_insn - && INSN_DELETED_P (last_combined_insn)) + && INSN_DELETED_P (last_combined_insn) + && last_combined_insn != BB_HEAD (this_basic_block)) last_combined_insn = PREV_INSN (last_combined_insn); if (last_combined_insn == NULL_RTX - || BARRIER_P (last_combined_insn) - || BLOCK_FOR_INSN (last_combined_insn) != this_basic_block || DF_INSN_LUID (last_combined_insn) <= DF_INSN_LUID (insn)) last_combined_insn = insn;