http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52837
Bug #: 52837 Summary: ICE in cp/mangle.c:3306 Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: m...@godbolt.org GCC version: 4.7.0 (custom build) System type: Ubuntu 11.10 3.0.0-16-generic $ /site/apps/gcc-4.7.0-drw.2/bin/gcc -v Using built-in specs. COLLECT_GCC=/site/apps/gcc-4.7.0-drw.2/bin/gcc COLLECT_LTO_WRAPPER=/site/apps/gcc-4.7.0-drw.2/libexec/gcc/x86_64-linux-gnu/4.7.0/lto-wrapper Target: x86_64-linux-gnu Configured with: ./configure --prefix /site/apps/gcc-4.7.0-drw.2 --build=x86_64-linux-gnu --enable-clocale=gnu --enable-gold --enable-languages=c,c++ --enable-ld=default --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-linker-build-id --enable-lto --enable-plugin --enable-shared --enable-threads=posix --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-pkgversion=DRW-internal-build --with-plugin-ld=ld.gold --with-system-zlib --with-gmp=/home/prodappadmin/fig-packages/scratch/gcc/4.7.0/build/gmp-5.0.2 --with-mpfr=/home/prodappadmin/fig-packages/scratch/gcc/4.7.0/build/mpfr-3.1.0 --with-mpc=/home/prodappadmin/fig-packages/scratch/gcc/4.7.0/build/mpc-0.9 --with-libelf=/home/prodappadmin/fig-packages/scratch/gcc/4.7.0/build/libelf-0.8.9 Thread model: posix gcc version 4.7.0 (DRW-internal-build) command-line: /site/apps/gcc-4.7.0-drw.2/bin/gcc -MD -g3 -Wall -fPIC -DXP_UNIX -DIN_GCC -DPLUGIN_NO_POISON -DHAVE_CONFIG_H -I/site/apps/gcc-4.7.0-drw.2/lib/gcc/x86_64-linux-gnu/4.7.0/plugin/include -I/home/mgodbolt/build/objs-js/dist/include -I/home/mgodbolt/build/objs-js/dist/lib -I//home/mgodbolt/local/include/js/ -O2 -x c++ -c util.c compiler output: In file included from /home/mgodbolt/build/objs-js/dist/include/jsval.h:48:0, from /home/mgodbolt/build/objs-js/dist/include/jspubtd.h:47, from /home/mgodbolt/build/objs-js/dist/include/jsapi.h:49, from gcc_compat.h:31, from util.c:21: /home/mgodbolt/build/objs-js/dist/include/jsutil.h:642:58: internal compiler error: in mangle_decl_string, at cp/mangle.c:3306 .... When compiling the attached file we get an ICE in cp/mangle.c line 3306 (commented "We shouldn't be trying to mangle an uninstantiated template."). I have been unable to winnow down a more confined example of this error as I am very unfamiliar with the code being built (it's an old version of the mozilla JS runtime). The error can be reproduced with the attached preprocessed file using simply "cc1plus util.ii"