From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9165 invoked by alias); 17 Dec 2011 12:50:03 -0000 Received: (qmail 9107 invoked by uid 22791); 17 Dec 2011 12:50:02 -0000 X-SWARE-Spam-Status: No, hits=-2.9 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; Sat, 17 Dec 2011 12:49:49 +0000 From: "vries at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/51271] [4.7 Regression] ICE in in maybe_record_trace_start, at dwarf2cfi.c:2244 Date: Sat, 17 Dec 2011 13:21: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: build, ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned 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: 2011-12/txt/msg01923.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51271 --- Comment #14 from vries at gcc dot gnu.org 2011-12-17 12:49:21 UTC --- Created attachment 26119 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26119 res_hconf.c.221r.mach, using Andrew's patch (In reply to comment #13) > I think my patch for PR 51471 will also fix this bug. I now know why I could > not reproduce it, I was using slightly different scheduling (-march=octeon > rather than the default). I tried out the patch, and the compiler does not assert any more. However, I'm not convinced that it fixes the problem. The patch inhibits scheduling of frame-related instructions in delay slots. AFAIU, the instruction causing problems in this PR is insn 141, and it is not marked as frame-related, so the patch has no direct effect on that instruction. The patch seems to have the following effect: the frame-related insn 129 (from the prologue) is inhibited from being scheduled into the delay slot of jump_insn 60. So instead, insn 141 is now scheduled into the delay slot of jump_insn 60. As a consequence insn 141 is now executed on both paths leading up to block 8, and the assert is not triggered anymore. rtl.h: ... /* 1 in an INSN or a SET if this rtx is related to the call frame, either changing how we compute the frame address or saving and restoring registers in the prologue and epilogue. . */ unsigned frame_related : 1; ... given this definition, maybe insn 141 should be marked as frame-related, since it restores a reg in the epilogue.