<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 --- - Inconsistent value of ATOMIC_LLONG_LOCK_FREE vs __atomic_always_lock_free(sizeof(long long), 0) on 32-bit x86"
href="https://llvm.org/bugs/show_bug.cgi?id=30581">30581</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Inconsistent value of ATOMIC_LLONG_LOCK_FREE vs __atomic_always_lock_free(sizeof(long long), 0) on 32-bit x86
</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>Linux
</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>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mgorny@gentoo.org
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Consider the following test program:
#include <iostream>
int main()
{
// for comparison
std::cerr << __GCC_ATOMIC_LONG_LOCK_FREE << std::endl;
std::cerr << __atomic_always_lock_free(sizeof(long), 0) << std::endl;
std::cerr << __GCC_ATOMIC_LLONG_LOCK_FREE << std::endl;
std::cerr << __atomic_always_lock_free(sizeof(long long), 0) << std::endl;
return 0;
}
$ clang++ -m32 test.cxx
$ ./a.out
2
1
1
1
So, ATOMIC_LLONG_LOCK_FREE indicates that the time is *sometimes* lock-free yet
__atomic_always_lock_free() indicates it's *always* lock-free.</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>