<html>
    <head>
      <base href="http://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 --- - extern thread_local int var -- compilation fails on access of var"
   href="http://llvm.org/bugs/show_bug.cgi?id=18986">18986</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>extern thread_local int var  -- compilation fails on access of var
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

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

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

        <tr>
          <th>OS</th>
          <td>All
          </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>LLVM Codegen
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>ariane@stack.nl
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=12158" name="attach_12158" title="Test case  (compilation only)">attachment 12158</a> <a href="attachment.cgi?id=12158&action=edit" title="Test case  (compilation only)">[details]</a></span>
Test case  (compilation only)

Compiling the included file with clang fails, while attempting to resolve a TLS
address lookup.

Affected platform:  amd64;  Note that i386 is not affected.
Tested on MacOSX.


Compiler output:

fatal error: error in backend: Cannot select: 0x7fafec81a310: i64 =
X86ISD::WrapperRIP 0x7fafec819f10 [ORD=2] [ID=7]
  0x7fafec819f10: i64 = TargetGlobalTLSAddress<i32* @v> 0 [TF=10] [ORD=2]
[ID=5]
In function: _Z3foov


Compiler invocation:

"/Users/ariane/programming/ilias_os/compiler/build/install/bin/clang-3.5" -cc1
-triple amd64 -emit-obj -disable-free -disable-llvm-verifier -main-file-name
cstdlib.cc -mrelocation-model static -mdisable-fp-elim -fmath-errno
-masm-verbose -mconstructor-aliases -munwind-tables -mcode-model large
-target-cpu x86-64 -disable-red-zone -nostdsysteminc -nobuiltininc
-sys-header-deps -D "_KERNEL=1" -O3 -Wno-tautological-compare
-Wno-c++1y-extensions -std=c++11 -fdeprecated-macro -ferror-limit 19
-fmessage-length 130 -ftls-model=initial-exec -ffreestanding -mstackrealign
-fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option
-fcolor-diagnostics -vectorize-loops -vectorize-slp -x c++ -o test.o test.cc


Notes:
compiler invocation exits with status code 70.  Assuming use of sysexits.h,
this is EX_SOFTWARE.</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>