From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24941 invoked by alias); 7 Nov 2012 00:39:19 -0000 Received: (qmail 24880 invoked by uid 55); 7 Nov 2012 00:39:03 -0000 From: "dave.anglin at bell dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/55195] [4.8 Regression] shorten_branches generates incorrect forward branch distances Date: Wed, 07 Nov 2012 00:39:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end 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/msg00533.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55195 --- Comment #13 from dave.anglin at bell dot net 2012-11-07 00:39:01 UTC --- On 6-Nov-12, at 10:40 AM, amylaar at gcc dot gnu.org wrote: > I see now that you get INT_MAX substituted as the maximum length if > the > value is unknown. > > If you add anything to that, the value becomes negative. > I suppose your only get-out-of-jail card with the current interface, > if > you can't/won't provide a full cond with constant values, is to let > ADJUST_INSN_LENGTH obliterate the MAX_INT, and replace it with > something > sensible. It appears that I need to provide the min length instead of the max length in the opaque condition. Maybe if I just avoid incrementing the length in ADJUST_INSN_LENGTH when it is MAX_INT, then the error won't occur. For the call patterns, the number of permutations got out of hand and impossible to maintain. Dave -- John David Anglin dave.anglin@bell.net