<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 --- - llvm/clang using __atomic_add_fetch_8 which is not available on x86 linux"
   href="https://llvm.org/bugs/show_bug.cgi?id=24908">24908</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>llvm/clang using __atomic_add_fetch_8 which is not available on x86 linux
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>rafael.espindola@gmail.com
          </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>$ cat test.cpp
#include <atomic>
std::atomic<uint64_t> foo;
int main() {
  ++foo;
}
$ clang++ test.cpp -o t -std=c++11  -m32
/tmp/test-c543d4.o:test.cpp:function std::__atomic_base<unsigned long
long>::operator++(): error: undefined reference to '__atomic_add_fetch_8'
clang-3.8: error: linker command failed with exit code 1 (use -v to see
invocation)

Running "g++ test.cpp -o t -std=c++11  -m32" works.

gcc produces a "lock cmpxchg8b" instead of a call.</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>