public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/43961]  New: [ARM thumb] "branch out of range" with thumb1_output_casesi
@ 2010-05-02 10:59 exceed at alae dot jp
  2010-05-02 11:05 ` [Bug c/43961] " exceed at alae dot jp
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: exceed at alae dot jp @ 2010-05-02 10:59 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c/43961] [ARM thumb] "branch out of range" with thumb1_output_casesi
  2010-05-02 10:59 [Bug c/43961] New: [ARM thumb] "branch out of range" with thumb1_output_casesi exceed at alae dot jp
@ 2010-05-02 11:05 ` exceed at alae dot jp
  2010-05-02 11:08 ` exceed at alae dot jp
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: exceed at alae dot jp @ 2010-05-02 11:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from exceed at alae dot jp  2010-05-02 11:05 -------
Created an attachment (id=20532)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20532&action=view)
test source for reproduce the bug

$ arm-elf-gcc -c -Os -mthumb test.i


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c/43961] [ARM thumb] "branch out of range" with thumb1_output_casesi
  2010-05-02 10:59 [Bug c/43961] New: [ARM thumb] "branch out of range" with thumb1_output_casesi exceed at alae dot jp
  2010-05-02 11:05 ` [Bug c/43961] " exceed at alae dot jp
@ 2010-05-02 11:08 ` exceed at alae dot jp
  2010-05-02 19:37 ` mikpe at it dot uu dot se
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: exceed at alae dot jp @ 2010-05-02 11:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from exceed at alae dot jp  2010-05-02 11:08 -------
Created an attachment (id=20533)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20533&action=view)
patch (quick hack ;-)

>From gcc-4_5-branch (svn r158961)


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c/43961] [ARM thumb] "branch out of range" with thumb1_output_casesi
  2010-05-02 10:59 [Bug c/43961] New: [ARM thumb] "branch out of range" with thumb1_output_casesi exceed at alae dot jp
  2010-05-02 11:05 ` [Bug c/43961] " exceed at alae dot jp
  2010-05-02 11:08 ` exceed at alae dot jp
@ 2010-05-02 19:37 ` mikpe at it dot uu dot se
  2010-05-10 16:03 ` [Bug target/43961] " ramana at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: mikpe at it dot uu dot se @ 2010-05-02 19:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from mikpe at it dot uu dot se  2010-05-02 19:37 -------
Also breaks on armv5tel-unknown-linux-gnueabi with gcc-4.5-20100429 and
gcc-4.6-20100501. It works with gcc-4.4-20100427 and gcc-4.3-20100103.


-- 

mikpe at it dot uu dot se changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikpe at it dot uu dot se


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/43961] [ARM thumb] "branch out of range" with thumb1_output_casesi
  2010-05-02 10:59 [Bug c/43961] New: [ARM thumb] "branch out of range" with thumb1_output_casesi exceed at alae dot jp
                   ` (2 preceding siblings ...)
  2010-05-02 19:37 ` mikpe at it dot uu dot se
@ 2010-05-10 16:03 ` ramana at gcc dot gnu dot org
  2010-06-22 12:23 ` mikpe at it dot uu dot se
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: ramana at gcc dot gnu dot org @ 2010-05-10 16:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from ramana at gcc dot gnu dot org  2010-05-10 16:03 -------
Confirmed - marking as a target bug .


-- 

ramana at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|c                           |target
     Ever Confirmed|0                           |1
 GCC target triplet|arm-elf                     |arm-elf,arm-eabi
      Known to fail|                            |4.6.0
   Last reconfirmed|0000-00-00 00:00:00         |2010-05-10 16:03:26
               date|                            |


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/43961] [ARM thumb] "branch out of range" with thumb1_output_casesi
  2010-05-02 10:59 [Bug c/43961] New: [ARM thumb] "branch out of range" with thumb1_output_casesi exceed at alae dot jp
                   ` (3 preceding siblings ...)
  2010-05-10 16:03 ` [Bug target/43961] " ramana at gcc dot gnu dot org
@ 2010-06-22 12:23 ` mikpe at it dot uu dot se
  2010-06-22 12:28 ` mikpe at it dot uu dot se
  2010-07-03  0:21 ` ramana at gcc dot gnu dot org
  6 siblings, 0 replies; 10+ messages in thread
From: mikpe at it dot uu dot se @ 2010-06-22 12:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from mikpe at it dot uu dot se  2010-06-22 12:22 -------
It's caused by r148770, which is when Richard Earnshaw added compressed switch
table support for Thumb-1.  See also:

http://gcc.gnu.org/ml/gcc-patches/2009-06/msg01698.html


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/43961] [ARM thumb] "branch out of range" with thumb1_output_casesi
  2010-05-02 10:59 [Bug c/43961] New: [ARM thumb] "branch out of range" with thumb1_output_casesi exceed at alae dot jp
                   ` (4 preceding siblings ...)
  2010-06-22 12:23 ` mikpe at it dot uu dot se
@ 2010-06-22 12:28 ` mikpe at it dot uu dot se
  2010-07-03  0:21 ` ramana at gcc dot gnu dot org
  6 siblings, 0 replies; 10+ messages in thread
From: mikpe at it dot uu dot se @ 2010-06-22 12:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from mikpe at it dot uu dot se  2010-06-22 12:28 -------
Created an attachment (id=20979)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20979&action=view)
proposed fix for PR43961

Update ARM's ADDR_VEC_ALIGN to correctly describe that its
ASM_OUTPUT_CASE_LABEL will add a 2-byte alignment directive for Thumb-1
compressed switch tables.  This fixes the test cases (both the PR43961 and the
PR44603 one) for me.  Untested beyond that, will include in full bootstraps and
regtests shortly.


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/43961] [ARM thumb] "branch out of range" with thumb1_output_casesi
  2010-05-02 10:59 [Bug c/43961] New: [ARM thumb] "branch out of range" with thumb1_output_casesi exceed at alae dot jp
                   ` (5 preceding siblings ...)
  2010-06-22 12:28 ` mikpe at it dot uu dot se
@ 2010-07-03  0:21 ` ramana at gcc dot gnu dot org
  6 siblings, 0 replies; 10+ messages in thread
From: ramana at gcc dot gnu dot org @ 2010-07-03  0:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from ramana at gcc dot gnu dot org  2010-07-03 00:21 -------
*** Bug 44603 has been marked as a duplicate of this bug. ***


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/43961] [ARM thumb] "branch out of range" with thumb1_output_casesi
       [not found] <bug-43961-4@http.gcc.gnu.org/bugzilla/>
  2013-01-03  0:00 ` jsm28 at gcc dot gnu.org
@ 2013-01-03  8:55 ` mikpe at it dot uu.se
  1 sibling, 0 replies; 10+ messages in thread
From: mikpe at it dot uu.se @ 2013-01-03  8:55 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #9 from Mikael Pettersson <mikpe at it dot uu.se> 2013-01-03 08:54:35 UTC ---
(In reply to comment #8)
> Mikael, ping on this patch from June 2010 ... what happened in testing?

I've included this patch in my local 4.6-based branch since June 2010, and it's
tested w/o regressions on armv5te ever since (configured w/o
--disable-multilib, so I assume the test suite will also test Thumb-1 not just
ARM mode).

The patch apparently didn't work in a 4.5-based compiler, but I don't have any
notes explaining what the issue was.  4.5 is EOL anyway.

Somehow I forgot to forward-port it to 4.7 so I haven't tested it yet in my
4.7-based branch.  Will do that asap.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/43961] [ARM thumb] "branch out of range" with thumb1_output_casesi
       [not found] <bug-43961-4@http.gcc.gnu.org/bugzilla/>
@ 2013-01-03  0:00 ` jsm28 at gcc dot gnu.org
  2013-01-03  8:55 ` mikpe at it dot uu.se
  1 sibling, 0 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2013-01-03  0:00 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #8 from Joseph S. Myers <jsm28 at gcc dot gnu.org> 2013-01-03 00:00:08 UTC ---
Mikael, ping on this patch from June 2010 ... what happened in testing?  And
shouldn't this bug be marked as a regression, given the identification of the
responsible revision?


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-01-03  8:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-02 10:59 [Bug c/43961] New: [ARM thumb] "branch out of range" with thumb1_output_casesi exceed at alae dot jp
2010-05-02 11:05 ` [Bug c/43961] " exceed at alae dot jp
2010-05-02 11:08 ` exceed at alae dot jp
2010-05-02 19:37 ` mikpe at it dot uu dot se
2010-05-10 16:03 ` [Bug target/43961] " ramana at gcc dot gnu dot org
2010-06-22 12:23 ` mikpe at it dot uu dot se
2010-06-22 12:28 ` mikpe at it dot uu dot se
2010-07-03  0:21 ` ramana at gcc dot gnu dot org
     [not found] <bug-43961-4@http.gcc.gnu.org/bugzilla/>
2013-01-03  0:00 ` jsm28 at gcc dot gnu.org
2013-01-03  8:55 ` mikpe at it dot uu.se

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).