https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85235

            Bug ID: 85235
           Summary: [mips] Error: branch out of range
           Product: gcc
           Version: 6.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mattst88 at gmail dot com
  Target Milestone: ---

Created attachment 43859
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43859&action=edit
preprocessed (gzip'd) source file

On mips when attempting to compile cython's (cython.org) Code.c file, gcc
produces code that gas is unable to assemble, with

{standard input}:417146: Error: branch out of range
{standard input}:417161: Error: branch out of range
...

MIPS' gas supports --relax-branch which seems like it's supposed to be able to
sort this out, but it doesn't seem to.

Fails on gcc 6.4.0 and 7.3.0. Other versions untested. Totally guessing on the
Component field.

The attached Code.i demonstrates the problem with

mips64el-unknown-linux-gnu-gcc -mabi=n32 -O2 -march=loongson3a -mplt -pipe
-fno-strict-aliasing -fPIC -x c -c Code.i -o Code.o

Reply via email to