[LLVMbugs] [Bug 21111] Clang miscompiles dllimport + thread local	variables
    bugzilla-daemon at llvm.org 
    bugzilla-daemon at llvm.org
       
    Fri Oct  3 23:52:11 PDT 2014
    
    
  
http://llvm.org/bugs/show_bug.cgi?id=21111
David Majnemer <david.majnemer at gmail.com> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
           Assignee|unassignedclangbugs at nondot. |david.majnemer at gmail.com
                   |org                         |
--- Comment #2 from David Majnemer <david.majnemer at gmail.com> ---
There are many things we could do to make this code compile and execute
correctly. Off of the top of my head:
- We could export the tls_index that the variable lives in and utilize that
when we reference the variable.
- We could create a thunk for the variable in all translation units which
define the variable.  The underlying variable would be thread local but not
exported; instead, we would export the thunk. All access to the variable would
go through the wrapper.  This is strikingly similar to the Itanium
thread-wrapper ABI.
Seeing as how MSVC will not accept this code, I see no reason to go through
heroics to make this work.
Fixed in r219049.
-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20141004/40866465/attachment.html>
    
    
More information about the llvm-bugs
mailing list