[Bug c++/59707] New: [4.8.2] Crash when using std::map with template class

martin.sandsmark at kde dot org gcc-bugzilla@gcc.gnu.org
Mon Jan 6 23:43:00 GMT 2014


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

            Bug ID: 59707
           Summary: [4.8.2] Crash when using std::map with template class
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: martin.sandsmark at kde dot org

Created attachment 31761
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31761&action=edit
Crashing source

Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/gcc-multilib/src/gcc-4.8-20131219/configure
--prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch
--disable-libssp --enable-gnu-unique-object --enable-linker-build-id
--enable-cloog-backend=isl --disable-cloog-version-check --enable-lto
--enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu
--enable-multilib --disable-werror --enable-checking=release
Thread model: posix


I'll just inline it here, just compile with "g++ filename.cpp" to crash:

#include <map>

struct T {
    template<class D> operator D*() const;
};

std::map<T, int> m;

void f(T x) {
    m[x];
}



More information about the Gcc-bugs mailing list