<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - external assembler error with clang, ARM thumb: "branch out of range""
   href="https://llvm.org/bugs/show_bug.cgi?id=31805">31805</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>external assembler error with clang, ARM thumb: "branch out of range"
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.9
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>arnd@linaro.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=17917" name="attach_17917" title="preprocessed arch/arm/kernel/suspend.c file from linux, reduced">attachment 17917</a> <a href="attachment.cgi?id=17917&action=edit" title="preprocessed arch/arm/kernel/suspend.c file from linux, reduced">[details]</a></span>
preprocessed arch/arm/kernel/suspend.c file from linux, reduced

Building an "allmodconfig" build of the Linux kernel for ARM (with additional
patches to make it work initially), I ran into one assembler error that happens
specifically in Thumb2 mode. I used creduce to produce a smaller test case:

/home/arnd/cross/bin/clang  -std=gnu89 -target arm-linux-gnueabihf -mthumb
-no-integrated-as -march=armv7-a -Wa,-mimplicit-it=always -O2 -c suspend.i
/tmp/suspend-be0319.s: Assembler messages:
/tmp/suspend-be0319.s:41: Error: branch out of range
clang: error: assembler command failed with exit code 1 (use -v to see
invocation)

The original file (before reducing) worked fine with clang-3.8 but broke with
3.9, the reduced version breaks with both, but still builds fine with gcc.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>