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