- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
#include <iostream> template <class T> class wrapper { public: static T get() { static thread_local T thing(12); return thing; } }; int main() { std::cout<<wrapper<int>::get()<<std::endl; } And I get this, it compile and function as expected using clang++
icpc -std=c++11 -g thread_local.cc
0 0x10b0cf2c0 __assert_rtn + 129
1 0x10b196eb3 ld::passes::tlvp::doPass(Options const&, ld::Internal&) + 1987
2 0x10b0d016b main + 913
3 0x7fff70f9c015 start + 1
A linker snapshot was created at:
/tmp/a.out-2018-03-19-204307.ld-snapshot
ld: Assertion failed: (0 && "wrong content type for target in tlv defs"), function doPass, file /Library/Caches/com.apple.xbs/Sources/ld64/ld64-351.8/src/ld/passes/tlvp.cpp, line 293.
- Tags:
- CC++
- Development Tools
- Intel® C++ Compiler
- Intel® Parallel Studio XE
- Intel® System Studio
- Optimization
- Parallel Computing
- Vectorization
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I've reported this case to our developer and will keep you updated. Case number is CMPLRS-50042.
Thanks,
Viet

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page