[LLVMbugs] [Bug 16650] New: atomic_add_fetch

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jul 18 08:19:24 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=16650

            Bug ID: 16650
           Summary: atomic_add_fetch
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: tatraian at deverto.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

I cannot compile libstdc++'s atomic library with long long type on 32 bit
machine.

So the following code cannot be compiled:

    #include <atomic>

    int main()
    {
      std::atomic<long long> l(0);
      ++l;
      return 0;
    }

With the following error:
    clang++ -std=c++11 atomic.cpp
    In file included from atomic.cpp:1:
    In file included from
/usr/lib/gcc/i486-linux-gnu/4.7/../../../../include/c++/4.7/atomic:41:
   
/usr/lib/gcc/i486-linux-gnu/4.7/../../../../include/c++/4.7/bits/atomic_base.h:369:16:
error: cannot compile this atomic
          library call yet
          { return __atomic_add_fetch(&_M_i, 1, memory_order_seq_cst); }
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.

-- 
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/20130718/7b7b04f9/attachment.html>


More information about the llvm-bugs mailing list