http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57552
Bug ID: 57552 Summary: Internal compiler error with vector::emplace_back() for templated class constructor Product: gcc Version: 4.7.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jussi.judin at ericsson dot com Created attachment 30271 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30271&action=edit Intermediate precompiled file resulting from this compilation I'm getting an internal compiler error when trying to compile following code with GCC 4.7.3 and with the 20130601 snapshot of 4.7 compiler series: #include <vector> template<typename T> class TemplateKlass { }; void funktion() { std::vector<TemplateKlass<int> > result; char segment; result.emplace_back(segment); } Here there is no constructor defined in TemplateKlass, but I get the same crash if I define proper constructors. GCC 4.7.3 results in following compiler output with given arguments: $ /tmp/c-4.7-3/bin/g++ -save-temps --verbose --std=c++11 -o out.o -c code.cc Using built-in specs. COLLECT_GCC=/tmp/c-4.7-3/bin/g++ Target: x86_64-unknown-linux-gnu Configured with: ./configure --prefix=/tmp/c-4.7-3 Thread model: posix gcc version 4.7.3 (GCC) COLLECT_GCC_OPTIONS='-save-temps' '-v' '-std=c++11' '-o' 'out.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /tmp/c-4.7-3/libexec/gcc/x86_64-unknown-linux-gnu/4.7.3/cc1plus -E -quiet -v -imultilib . -imultiarch x86_64-linux-gnu -D_GNU_SOURCE code.cc -mtune=generic -march=x86-64 -std=c++11 -fpch-preprocess -o code.ii ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu" ignoring nonexistent directory "/tmp/c-4.7-3/lib/gcc/x86_64-unknown-linux-gnu/4.7.3/../../../../x86_64-unknown-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /home/ejusjud/compiles/include . /tmp/c-4.7-3/lib/gcc/x86_64-unknown-linux-gnu/4.7.3/../../../../include/c++/4.7.3 /tmp/c-4.7-3/lib/gcc/x86_64-unknown-linux-gnu/4.7.3/../../../../include/c++/4.7.3/x86_64-unknown-linux-gnu/. /tmp/c-4.7-3/lib/gcc/x86_64-unknown-linux-gnu/4.7.3/../../../../include/c++/4.7.3/backward /tmp/c-4.7-3/lib/gcc/x86_64-unknown-linux-gnu/4.7.3/include /usr/local/include /tmp/c-4.7-3/include /tmp/c-4.7-3/lib/gcc/x86_64-unknown-linux-gnu/4.7.3/include-fixed /usr/include/x86_64-linux-gnu /usr/include End of search list. COLLECT_GCC_OPTIONS='-save-temps' '-v' '-std=c++11' '-o' 'out.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /tmp/c-4.7-3/libexec/gcc/x86_64-unknown-linux-gnu/4.7.3/cc1plus -fpreprocessed code.ii -quiet -dumpbase code.cc -mtune=generic -march=x86-64 -auxbase-strip out.o -std=c++11 -version -o code.s GNU C++ (GCC) version 4.7.3 (x86_64-unknown-linux-gnu) compiled by GNU C version 4.7.3, GMP version 5.1.2, MPFR version 3.1.1-p2, MPC version 1.0.1 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 GNU C++ (GCC) version 4.7.3 (x86_64-unknown-linux-gnu) compiled by GNU C version 4.7.3, GMP version 5.1.2, MPFR version 3.1.1-p2, MPC version 1.0.1 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: ebd72fbdf2a173314a31a8680934f115 ‘ Internal compiler error: Error reporting routines re-entered. Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. The 20130601 snapshot will result in similar output. Also attached the intermediate .ii precompiled file.