Bug 49433 - internal compiler error: in write_builtin_type, at cp/mangle.c:2167
Summary: internal compiler error: in write_builtin_type, at cp/mangle.c:2167
Status: RESOLVED DUPLICATE of bug 51432
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.6.0
: P3 minor
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-16 09:11 UTC by philb
Modified: 2013-05-25 08:59 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
testcase (66.57 KB, application/x-bzip)
2011-06-16 09:11 UTC, philb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description philb 2011-06-16 09:11:14 UTC
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.
$
Comment 1 Vasiliy 2011-09-23 06:11:44 UTC
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)
Comment 2 Paolo Carlini 2011-09-23 10:00:10 UTC
I would say put a breakpoint on write_builtin_type and see what a heck is that type!
Comment 3 Paolo Carlini 2013-05-25 08:59:58 UTC
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 ***