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: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to