From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32682 invoked by alias); 7 Nov 2012 00:54:11 -0000 Received: (qmail 31887 invoked by uid 48); 7 Nov 2012 00:53:49 -0000 From: "amylaar at gcc dot gnu.org" 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:54: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: amylaar 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: --- 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/msg00536.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55195 --- Comment #14 from Jorn Wolfgang Rennecke 2012-11-07 00:53:48 UTC --- (In reply to comment #13) > It appears that I need to provide the min length instead of the max > length > in the opaque condition. It's more like, this is the only thing you can do effectively as long as you have an unbounded value in the attribute. And the way the max_attr_length calculation works now, the only bounded values are selections of constants via if-then-else / cond. > Maybe if I just avoid incrementing the length in ADJUST_INSN_LENGTH when > it is MAX_INT, then the error won't occur. I suppose so, but you'd still have a ridiculous size estimate. And having one INT_MAX length instruction plus a delay slot insn can still push you over the INT_MAX edge.