http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55195
Bug #: 55195 Summary: [4.8 Regression] shorten_branches generates incorrect forward branch distances Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassig...@gcc.gnu.org ReportedBy: dang...@gcc.gnu.org CC: amyl...@gcc.gnu.org Host: hppa-unknown-linux-gnu Target: hppa-unknown-linux-gnu Build: hppa-unknown-linux-gnu /bin/sh ./libtool --tag=GCJ --mode=compile /home/dave/gnu/gcc/objdir/./gcc/gcj -B/home/dave/gnu/gcc/objdir/hppa-linux-gnu/libjava/ -B/home/dave/gnu/gcc/objdir /./gcc/ -B/home/dave/opt/gnu/gcc/gcc-4.8.0/hppa-linux-gnu/bin/ -B/home/dave/opt/ gnu/gcc/gcc-4.8.0/hppa-linux-gnu/lib/ -isystem /home/dave/opt/gnu/gcc/gcc-4.8.0/ hppa-linux-gnu/include -isystem /home/dave/opt/gnu/gcc/gcc-4.8.0/hppa-linux-gnu/ sys-include -fclasspath= -fbootclasspath=../../../gcc/libjava/classpath/lib - -encoding=UTF-8 -Wno-deprecated -fbootstrap-classes -g -O2 -c -o gnu/javax/swin g/text/html/parser/HTML_401F.lo -fsource-filename=/home/dave/gnu/gcc/objdir/hppa -linux-gnu/libjava/classpath/lib/classes -MT gnu/javax/swing/text/html/parser/HT ML_401F.lo -MD -MP -MF gnu/javax/swing/text/html/parser/HTML_401F.deps @gnu/java x/swing/text/html/parser/HTML_401F.list libtool: compile: /home/dave/gnu/gcc/objdir/./gcc/gcj -B/home/dave/gnu/gcc/objdir/hppa-linux-gnu/libjava/ -B/home/dave/gnu/gcc/objdir/./gcc/ -B/home/dave/opt/gnu/gcc/gcc-4.8.0/hppa-linux-gnu/bin/ -B/home/dave/opt/gnu/gcc/gcc-4.8.0/hppa-linux-gnu/lib/ -isystem /home/dave/opt/gnu/gcc/gcc-4.8.0/hppa-linux-gnu/include -isystem /home/dave/opt/gnu/gcc/gcc-4.8.0/hppa-linux-gnu/sys-include -fclasspath= -fbootclasspath=../../../gcc/libjava/classpath/lib --encoding=UTF-8 -Wno-deprecated -fbootstrap-classes -g -O2 -c -fsource-filename=/home/dave/gnu/gcc/objdir/hppa-linux-gnu/libjava/classpath/lib/classes -MT gnu/javax/swing/text/html/parser/HTML_401F.lo -MD -MP -MF gnu/javax/swing/text/html/parser/HTML_401F.deps @gnu/javax/swing/text/html/parser/HTML_401F.list -fPIC -o gnu/javax/swing/text/html/parser/.libs/HTML_401F.o /tmp/cc4e6qnd.s: Assembler messages: /tmp/cc4e6qnd.s:79330: Error: Field out of range [-8192..8191] (8316). /tmp/cc4e6qnd.s:79362: Error: Field out of range [-8192..8191] (8280). /tmp/cc4e6qnd.s:79395: Error: Field out of range [-8192..8191] (8244). /tmp/cc4e6qnd.s:79428: Error: Field out of range [-8192..8191] (8208). make[3]: *** [gnu/javax/swing/text/html/parser/HTML_401F.lo] Error 1 /bin/sh ./libtool --tag=GCJ --mode=compile /home/dave/gnu/gcc/objdir/./gcc/gcj -B/home/dave/gnu/gcc/objdir/hppa-linux-gnu/libjava/ -B/home/dave/gnu/gcc/objdir /./gcc/ -B/home/dave/opt/gnu/gcc/gcc-4.8.0/hppa-linux-gnu/bin/ -B/home/dave/opt/ gnu/gcc/gcc-4.8.0/hppa-linux-gnu/lib/ -isystem /home/dave/opt/gnu/gcc/gcc-4.8.0/ hppa-linux-gnu/include -isystem /home/dave/opt/gnu/gcc/gcc-4.8.0/hppa-linux-gnu/ sys-include -fclasspath= -fbootclasspath=../../../gcc/libjava/classpath/lib - -encoding=UTF-8 -Wno-deprecated -fbootstrap-classes -g -O2 -c -o gnu/java/nio/c harset.lo -fsource-filename=/home/dave/gnu/gcc/objdir/hppa-linux-gnu/libjava/cla sspath/lib/classes -MT gnu/java/nio/charset.lo -MD -MP -MF gnu/java/nio/charset. deps @gnu/java/nio/charset.list libtool: compile: /home/dave/gnu/gcc/objdir/./gcc/gcj -B/home/dave/gnu/gcc/objd ir/hppa-linux-gnu/libjava/ -B/home/dave/gnu/gcc/objdir/./gcc/ -B/home/dave/opt/g nu/gcc/gcc-4.8.0/hppa-linux-gnu/bin/ -B/home/dave/opt/gnu/gcc/gcc-4.8.0/hppa-lin ux-gnu/lib/ -isystem /home/dave/opt/gnu/gcc/gcc-4.8.0/hppa-linux-gnu/include -is ystem /home/dave/opt/gnu/gcc/gcc-4.8.0/hppa-linux-gnu/sys-include -fclasspath= - fbootclasspath=../../../gcc/libjava/classpath/lib --encoding=UTF-8 -Wno-deprecat ed -fbootstrap-classes -g -O2 -c -fsource-filename=/home/dave/gnu/gcc/objdir/hpp a-linux-gnu/libjava/classpath/lib/classes -MT gnu/java/nio/charset.lo -MD -MP -M F gnu/java/nio/charset.deps @gnu/java/nio/charset.list -fPIC -o gnu/java/nio/.l ibs/charset.o /tmp/ccKzEAz7.s: Assembler messages: /tmp/ccKzEAz7.s:105074: Error: Field out of range [-8192..8191] (9344). /tmp/ccKzEAz7.s:105079: Error: Field out of range [-8192..8191] (9288). /tmp/ccKzEAz7.s:105084: Error: Field out of range [-8192..8191] (9232). /tmp/ccKzEAz7.s:105089: Error: Field out of range [-8192..8191] (9176). /tmp/ccKzEAz7.s:105094: Error: Field out of range [-8192..8191] (9120). /tmp/ccKzEAz7.s:105099: Error: Field out of range [-8192..8191] (9064). /tmp/ccKzEAz7.s:105104: Error: Field out of range [-8192..8191] (9008). /tmp/ccKzEAz7.s:105109: Error: Field out of range [-8192..8191] (8952). /tmp/ccKzEAz7.s:105114: Error: Field out of range [-8192..8191] (8896). /tmp/ccKzEAz7.s:105119: Error: Field out of range [-8192..8191] (8836). /tmp/ccKzEAz7.s:105125: Error: Field out of range [-8192..8191] (8776). /tmp/ccKzEAz7.s:105130: Error: Field out of range [-8192..8191] (8720). /tmp/ccKzEAz7.s:105135: Error: Field out of range [-8192..8191] (8664). /tmp/ccKzEAz7.s:105140: Error: Field out of range [-8192..8191] (8608). /tmp/ccKzEAz7.s:105145: Error: Field out of range [-8192..8191] (8552). /tmp/ccKzEAz7.s:105150: Error: Field out of range [-8192..8191] (8496). /tmp/ccKzEAz7.s:105155: Error: Field out of range [-8192..8191] (8440). /tmp/ccKzEAz7.s:105160: Error: Field out of range [-8192..8191] (8384). /tmp/ccKzEAz7.s:105165: Error: Field out of range [-8192..8191] (8328). /tmp/ccKzEAz7.s:105170: Error: Field out of range [-8192..8191] (8268). /tmp/ccKzEAz7.s:105176: Error: Field out of range [-8192..8191] (8208). make[3]: *** [gnu/java/nio/charset.lo] Error 1 All out of range targets are in the forward direction. Bug was introduced in revision 192634: 2012-10-20 Joern Rennecke <joern.renne...@embecosm.com> Richard Sandiford <rdsandif...@googlemail.com> * final.c (shorten_branches): When optimizing, start with small length and increase from there, and don't decrease lengths. Problem goes away if I revert this change.