This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/55028] New: _GLIBCXX_DEBUG is broken when using v7 namespace


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55028

             Bug #: 55028
           Summary: _GLIBCXX_DEBUG is broken when using v7 namespace
    Classification: Unclassified
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: oleg@smolsky.net


I've just hit an issue when using _GLIBCXX_DEBUG together with gcc 4.7.2 built
using --enable-symvers=gnu-versioned-namespace flag. The issue is specific to
unordered_mulimap and can be reproduced using the following:

struct MyType
{
};

#if 1
using MyMap = std::multimap<std::string, MyType *>;    // works
#else
using MyMap = std::unordered_multimap<std::string, MyType *>;  // fails to link
#endif

MyMap m;
m.insert({"blah"}, new MyType});

The latter variant fails to link with the following message:

misc/libmisc.a(statmgr.o): In function
`__gnu_debug::_Safe_unordered_container_base::~_Safe_unordered_container_base()':
statmgr.cc:(.text._ZN11__gnu_debug30_Safe_unordered_container_baseD2Ev[_ZN11__gnu_debug30_Safe_unordered_container_baseD5Ev]+0x15):
undefined reference to
`__gnu_debug::_Safe_unordered_container_base::_M_detach_all()'

The compiler was configured as follows:

Configured with: ../gcc-4.7.2/configure --prefix=/opt/gcc-4.7-v7
--enable-languages=c,c++,lto --with-mpfr=/opt/gcc-4.6-rbt
--with-cloog=/opt/gcc-4.6-rbt --with-mpc=/opt/gcc-4.6-rbt
--with-gmp=/opt/gcc-4.6-rbt --with-system-zlib --disable-multilib --enable-lto
--with-build-config=bootstrap-lto --with-fpmath=sse --enable-build-with-cxx
--enable-gold=yes --enable-cloog-backend=isl --disable-cloog-version-check
--enable-symvers=gnu-versioned-namespace CFLAGS=-O3 CXXFLAGS=-O3
Thread model: posix
gcc version 4.7.2 (GCC)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]