Following code crashes in gcc trunk revisions r154095 and r154098. r153685 compiles fine.
Command line switches: g++ -std=c++0x or g++ -std=gnu++0x ------ testcase.cpp ------ struct A { void f() { static struct { } s; } }; -------------------------- $ /mnt/svn/gcc-trunk/binary-154095-lto/bin/g++ -v -std=gnu++0x -c -o tmp.o testcase.cpp Using built-in specs. COLLECT_GCC=/mnt/svn/gcc-trunk/binary-154095-lto/bin/g++ COLLECT_LTO_WRAPPER=/mnt/svn/gcc-trunk/binary-154095-lto/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../configure --enable-languages=lto,c,c++ --prefix=/mnt/svn/gcc-trunk/binary-154095-lto/ Thread model: posix gcc version 4.5.0 20091111 (experimental) (GCC) COLLECT_GCC_OPTIONS='-v' '-std=gnu++0x' '-c' '-o' 'tmp.o' '-shared-libgcc' '-mtune=generic' /mnt/svn/gcc-trunk/binary-154095-lto/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/cc1plus -fpreprocessed testcase-x.i -quiet -dumpbase testcase-x.i -mtune=generic -auxbase-strip tmp.o -std=gnu++0x -version -o /tmp/ccQx8uCh.s GNU C++ (GCC) version 4.5.0 20091111 (experimental) (x86_64-unknown-linux-gnu) compiled by GNU C version 4.5.0 20091111 (experimental), GMP version 4.3.1, MPFR version 2.4.1-p5, MPC version 0.7 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 GNU C++ (GCC) version 4.5.0 20091111 (experimental) (x86_64-unknown-linux-gnu) compiled by GNU C version 4.5.0 20091111 (experimental), GMP version 4.3.1, MPFR version 2.4.1-p5, MPC version 0.7 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 Compiler executable checksum: ea1de8eb0212138b74b7539fd1683110 testcase-x.i: In member function ‘void A::f()’: testcase-x.i:5:7: internal compiler error: lang_* check: failed in discriminator_for_local_entity, at cp/mangle.c:1581 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. -- Summary: ICE: lang_* check: failed in discriminator_for_local_entity, at cp/mangle.c:1581 Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: zsojka at seznam dot cz GCC host triplet: x86_64-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42010