Created attachment 24543 [details] testcase Due to some stray CFLAGS I found myself compiling libstdc++ with -flto turned on, which yielded: $ arm-oe-linux-gnueabi-g++ -O2 -flto -g -fpermissive -std=gnu++0x atomic.ii -S In file included from /home/pb/oe/build-giga/tmp-eglibc/work/armv6-oe-linux-gnueabi/gcc-runtime-4.6.0-r4/gcc-4.6.0/build.arm-oe-linux-gnueabi.arm-oe-linux-gnueabi/libstdc++-v3/include/functional:59:0, from /home/pb/oe/build-giga/tmp-eglibc/work/armv6-oe-linux-gnueabi/gcc-runtime-4.6.0-r4/gcc-4.6.0/build.arm-oe-linux-gnueabi.arm-oe-linux-gnueabi/libstdc++-v3/include/mutex:43, from /home/pb/oe/build-giga/tmp-eglibc/work/armv6-oe-linux-gnueabi/gcc-runtime-4.6.0-r4/gcc-4.6.0/libstdc++-v3/src/atomic.cc:28: /home/pb/oe/build-giga/tmp-eglibc/work/armv6-oe-linux-gnueabi/gcc-runtime-4.6.0-r4/gcc-4.6.0/build.arm-oe-linux-gnueabi.arm-oe-linux-gnueabi/libstdc++-v3/include/bits/functional_hash.h: In instantiation of 'std::size_t std::hash<_Tp>::operator()(_Tp) const [with _Tp = long double, std::size_t = unsigned int]': /home/pb/oe/build-giga/tmp-eglibc/work/armv6-oe-linux-gnueabi/gcc-runtime-4.6.0-r4/gcc-4.6.0/libstdc++-v3/src/atomic.cc:122:1: instantiated from here /home/pb/oe/build-giga/tmp-eglibc/work/armv6-oe-linux-gnueabi/gcc-runtime-4.6.0-r4/gcc-4.6.0/build.arm-oe-linux-gnueabi.arm-oe-linux-gnueabi/libstdc++-v3/include/bits/functional_hash.h:184:5: internal compiler error: in write_builtin_type, at cp/mangle.c:2167 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. $
Same result on PowerPC with gcc 4.6.1: /usr/lib/gcc/powerpc-lynx-lynxos/4.6.1/../../../../powerpc-lynx-lynxos/include/boost/lexical_cast.hpp: In instantiation of 'bool boost::detail::lexical_stream_limited_src<CharT, Base, Traits>::operator<<(long double) [with CharT = char, Base = std::basic_streambuf<char>, Traits = std::char_traits<char>]': conversion.cpp:45:1: instantiated from here /usr/lib/gcc/powerpc-lynx-lynxos/4.6.1/../../../../powerpc-lynx-lynxos/include/boost/lexical_cast.hpp:971:21: internal compiler error: in write_builtin_type, at cp/mangle.c:2167 This only appears with -O2 -flto and passes -Os -flto. gcc -v: Using built-in specs. COLLECT_GCC=powerpc-lynx-lynxos-gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/powerpc-lynx-lynxos/4.6.1/lto-wrapper Target: powerpc-lynx-lynxos Configured with: ../src/configure --prefix=/usr --target=powerpc-lynx-lynxos --disable-nls --enable-multilib --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --disable-libstdcxx-pch --enable-plugin --disable-softfloat --with-tune=750 --with-system-zlib --enable-threads=posix Thread model: lynx gcc version 4.6.1 (GCC)
I would say put a breakpoint on write_builtin_type and see what a heck is that type!
I'm pretty sure it's a Dup, otherwise, if the issue persists, please re-open, thanks. *** This bug has been marked as a duplicate of bug 51432 ***