Environment:

$ arm-elf-gcc -v
Using built-in specs.
COLLECT_GCC=arm-elf-gcc
COLLECT_LTO_WRAPPER=/cygdrive/c/usr/local/cross/libexec/gcc/arm-elf/4.5.0/lto-wrapper.exe
Target: arm-elf
Configured with: ../configure --prefix=/cygdrive/c/usr/local/cross
--target=arm-elf --with-float=soft --enable-languages=c,c++ --enable-lto
--with-libelf=/usr/local
Thread model: single
gcc version 4.5.0 (GCC)

Error:

$ arm-elf-gcc -c -Os -mthumb test.i
/cygdrive/c/Users/exceed/AppData/Local/Temp/cc6UR3zm.s: Assembler messages:
/cygdrive/c/Users/exceed/AppData/Local/Temp/cc6UR3zm.s:32816: Error: branch out
of range

Problem:

I think that the length of jump table does not contains a align code.
When jump table mode is SImode, ASM_OUTPUT_CASE_LABEL generates a align code.
But length does not contains this align code. (And ADDR_VEC_ALIGN is defined to
0)

Quick hack (for 4.5 branch):

Please see attached file.


-- 
           Summary: [ARM thumb] "branch out of range" with
                    thumb1_output_casesi
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: exceed at alae dot jp
  GCC host triplet: i686-pc-cygwin
GCC target triplet: arm-elf


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43961

Reply via email to