[LLVMbugs] [Bug 19393] New: C++11 atomics fail to link

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Apr 10 12:36:47 PDT 2014


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

            Bug ID: 19393
           Summary: C++11 atomics fail to link
           Product: dragonegg
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: New Bugs
          Assignee: baldrick at free.fr
          Reporter: scott+llvm+bugzilla at pakin.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 12362
  --> http://llvm.org/bugs/attachment.cgi?id=12362&action=edit
Minimal reproducer, courtesy of Aleksandr Drozd

When using std::atomic, this works:

    $ g++ -std=c++11 -o atomics atomics.cpp

This doesn't:

    $ g++ -fplugin=/usr/local/lib/dragonegg.so -std=c++11 -o atomics
atomics.cpp
    /tmp/ccYWBxLQ.o: In function `std::__atomic_base<int>::store(int,
std::memory_order)':
   
atomics.cpp:(.text._ZNSt13__atomic_baseIiE5storeEiSt12memory_order[_ZNSt13__atomic_baseIiE5storeEiSt12memory_order]+0x44):
undefined reference to `__atomic_store_4'
    /tmp/ccYWBxLQ.o: In function
`std::__atomic_base<int>::load(std::memory_order) const':
   
atomics.cpp:(.text._ZNKSt13__atomic_baseIiE4loadESt12memory_order[_ZNKSt13__atomic_baseIiE4loadESt12memory_order]+0x38):
undefined reference to `__atomic_load_4'
    collect2: error: ld returned 1 exit status

Here's what I'm running:

    $ g++ --version | head -1
    g++ (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
    $ svn info | grep Revision
    Revision: 205933
    $ uname -a
    Linux morbo 3.11.0-18-generic #32-Ubuntu SMP Tue Feb 18 21:11:14 UTC 2014
x86_64 x86_64 x86_64 GNU/Linux

I've attached a minimal reproducer.

Thanks in advance for your attention,
-- Scott

-- 
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/20140410/11a8d3bb/attachment.html>


More information about the llvm-bugs mailing list