From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23755 invoked by alias); 4 Nov 2012 22:23:27 -0000 Received: (qmail 23645 invoked by uid 55); 4 Nov 2012 22:23:05 -0000 From: "dave.anglin at bell dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/55195] [4.8 Regression] shorten_branches generates incorrect forward branch distances Date: Sun, 04 Nov 2012 22:23:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dave.anglin at bell dot net X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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-11/txt/msg00312.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55195 --- Comment #6 from dave.anglin at bell dot net 2012-11-04 22:23:04 UTC --- On 4-Nov-12, at 12:31 PM, amylaar at gcc dot gnu.org wrote: > The instruction call_symref_pic_post_reload has the following length > attribute setting: > > (set (attr "length") (symbol_ref "pa_attr_length_call (insn, 0)")) > > Such a length attribute is not considered variable by > shorten_branches. > > You need to include a clause that is directly in the attribute, e.g. > (and (match_test "0") (eq (match_dup 0) (pc))) Thanks Jorn for debugging this. Dave -- John David Anglin dave.anglin@bell.net