<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:david.majnemer@gmail.com" title="David Majnemer <david.majnemer@gmail.com>"> <span class="fn">David Majnemer</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Clang miscompiles dllimport + thread local variables"
href="http://llvm.org/bugs/show_bug.cgi?id=21111">bug 21111</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>FIXED
</td>
</tr>
<tr>
<td style="text-align:right;">Assignee</td>
<td>unassignedclangbugs@nondot.org
</td>
<td>david.majnemer@gmail.com
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Clang miscompiles dllimport + thread local variables"
href="http://llvm.org/bugs/show_bug.cgi?id=21111#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Clang miscompiles dllimport + thread local variables"
href="http://llvm.org/bugs/show_bug.cgi?id=21111">bug 21111</a>
from <span class="vcard"><a class="email" href="mailto:david.majnemer@gmail.com" title="David Majnemer <david.majnemer@gmail.com>"> <span class="fn">David Majnemer</span></a>
</span></b>
<pre>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.</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>