From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 119978 invoked by alias); 17 Apr 2015 07:28:10 -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 119897 invoked by uid 48); 17 Apr 2015 07:28:06 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/65779] [5/6 Regression] undefined local symbol on powerpc [regression] Date: Fri, 17 Apr 2015 07:28: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: 5.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub 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: 5.0 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: 2015-04/txt/msg01400.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65779 --- Comment #6 from Jakub Jelinek --- (In reply to Alan Modra from comment #4) > Created attachment 35342 [details] > prototype patch > > This seems to cure the testcase. I haven't bootstrapped it, and it probably > isn't ideal since I haven't poked at debug insns a lot.. > Still, it points out where the problem is, in move_insn_for_shrink_wrap. Can't you use DF infrastructure for that (before actually moving the insn)? I think pro_and_epilogue pass doesn't compute DF_DU_CHAINs, but perhaps something along the lines of DCE reset_unmarked_insns_debug_uses? I.e. not perform it at all if !MAY_HAVE_DEBUG_INSNS, and use DF infrastructure to find out if the debug insn references the register. Of course, unlike DCE, we aren't looking at debug instructions referencing unmarked insns, but debug instructions referencing a particular hard register. Note that live_edge_for_reg is called multiple times and thus could move across more than one basic block, so perhaps you'd need to remember the sequence of basic blocks to scan during the /* At this point we are committed to moving INSN, but let's try to move it as far as we can. */ loop.