This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/55195] [4.8 Regression] shorten_branches generates incorrect forward branch distances
- From: "amylaar at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 07 Nov 2012 00:53:48 +0000
- Subject: [Bug middle-end/55195] [4.8 Regression] shorten_branches generates incorrect forward branch distances
- Auto-submitted: auto-generated
- References: <bug-55195-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55195
--- Comment #14 from Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> 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.