<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - armv4t TLS crash"
   href="https://bugs.llvm.org/show_bug.cgi?id=49126">49126</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>armv4t TLS crash
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </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>jfc@mit.edu
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=24509" name="attach_24509" title="program to trigger compiler crash">attachment 24509</a> <a href="attachment.cgi?id=24509&action=edit" title="program to trigger compiler crash">[details]</a></span>
program to trigger compiler crash

Compiling the attached program with

$ clang -cc1 -triple armv4t-apple-macosx10.9.0 -S tls.c

causes a backend crash.  Maybe armv4t does not support TLS?  If that's the
problem clang should report a better error.  I hit this problem because I added
a runtime that uses TLS and the build infrastructure decided it needed to be
built for every possible Apple ARM system.  (I'm building on an M1 Mac.)

fatal error: error in backend: Cannot select: t13: ch,glue = ARMISD::CALL t11,
t10, Register:i32 $r0, RegisterMask:Untyped, t11:1
  t10: i32,ch = load<(non-temporal dereferenceable invariant load 4 from got)>
t0, t9, undef:i32
    t9: i32 = ARMISD::WrapperPIC TargetGlobalTLSAddress:i32<%struct.S** @tls> 0
[TF=128]
      t8: i32 = TargetGlobalTLSAddress<%struct.S** @tls> 0 [TF=128]
    t3: i32 = undef
  t5: i32 = Register $r0
  t12: Untyped = RegisterMask
  t11: ch,glue = CopyToReg t10:1, Register:i32 $r0, t9
    t5: i32 = Register $r0
    t9: i32 = ARMISD::WrapperPIC TargetGlobalTLSAddress:i32<%struct.S** @tls> 0
[TF=128]
      t8: i32 = TargetGlobalTLSAddress<%struct.S** @tls> 0 [TF=128]
In function: get</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>