This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/47952] [trans-mem] undefined reference to transaction clone
- From: "rth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 9 Mar 2011 23:02:01 +0000
- Subject: [Bug c++/47952] [trans-mem] undefined reference to transaction clone
- Auto-submitted: auto-generated
- References: <bug-47952-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47952
--- Comment #10 from Richard Henderson <rth at gcc dot gnu.org> 2011-03-09 23:01:38 UTC ---
The remaining problem in the full glob2 test is
src/Unit.o: In function `transaction clone for Unit::~Unit()':
Unit.cpp:(.text._ZGTtN4UnitD2Ev[transaction clone for Unit::~Unit()]+0x2c):
undefined reference to `transaction clone for std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::~basic_string()'
collect2: ld returned 1 exit status
which really really doesn't exist. No amount of marking this
function weak is going to work.
I suspect, but have not yet verified, that this is related to
// Inhibit implicit instantiations for required instantiations,
// which are defined via explicit instantiations elsewhere.
// NB: This syntax is a GNU extension.
#if _GLIBCXX_EXTERN_TEMPLATE > 0
extern template class basic_string<char>;
in that we're copying the "is extern" bit, which is not true for
the transactional clone.