<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 --- - assertion failure when determining c11 _Atomic struct layout" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D23985&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=rPdDd_VjR9JqdEEKtLZga_y3_wpk-nCqiq-qDtN1ItQ&s=At77hDwnrfE-ectmE0h7T0-rxVW-JnfV_5WfQE9Y_n8&e=">23985</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>assertion failure when determining c11 _Atomic struct layout
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.6
</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>LLVM Codegen
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>michael.b.bassett@gmail.com
</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=14531" name="attach_14531" title="original source file as well of post-cpp source and clang invocation">attachment 14531</a> <a href="attachment.cgi?id=14531&action=edit" title="original source file as well of post-cpp source and clang invocation">[details]</a></span>
original source file as well of post-cpp source and clang invocation
Received an assertion failure when attempting to compile the bug_case.c
(attached):
Assertion failed: (Ty->isSized() && "Cannot getTypeInfo() on a type that is
unsized!"), function getTypeSizeInBits, file
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.6/clang-3.6/work/llvm-3.6.1.src/include/llvm/IR/DataLayout.h,
line 500.
A more complicated variant of this case arose when attempting to construct a
struct holding a pointer and a counter in order to cope with the ABA problem
when implementing a lock-free queue. This construct will arise in many atomic
containers composed of linked elements. A workaround is to use a void pointer
in struct ptr instead of a pointer to the linked type.
This bug is not present in clang-3.5 but is in clang-3.6.1. This same behavior
is exhibited as of clang-3.7 (trunk 239386).</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>