/usr/arm-linux-gnueabi/include/c++/4.6.3/bits/functional_hash.h:184:5: internal compiler error: in write_builtin_type, at cp/mangle.c:2168

Bug #1014658 reported by Stefan Beller on 2012-06-18
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro GCC
Fix Released
Low
Unassigned
gcc-4.6 (Ubuntu)
Medium
Unassigned
gcc-4.6-armel-cross (Ubuntu)
Medium
Unassigned
gcc-4.7 (Ubuntu)
Medium
Unassigned

Bug Description

Attached there is a script(reportbug.sh) which tries to compile a minimal example file(testclass.cpp).
The file as found in /tmp/ccoYSkon.out is also attached.

The console output is:

In file included from /usr/arm-linux-gnueabi/include/c++/4.6.3/bits/basic_string.h:2974:0,
                 from /usr/arm-linux-gnueabi/include/c++/4.6.3/string:54,
                 from /usr/arm-linux-gnueabi/include/c++/4.6.3/bits/locale_classes.h:42,
                 from /usr/arm-linux-gnueabi/include/c++/4.6.3/bits/ios_base.h:43,
                 from /usr/arm-linux-gnueabi/include/c++/4.6.3/ios:43,
                 from /usr/arm-linux-gnueabi/include/c++/4.6.3/ostream:40,
                 from /usr/arm-linux-gnueabi/include/c++/4.6.3/iostream:40,
                 from testclass.cpp:4:
/usr/arm-linux-gnueabi/include/c++/4.6.3/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]’:
testclass.cpp:40:1: instantiated from here
/usr/arm-linux-gnueabi/include/c++/4.6.3/bits/functional_hash.h:184:5: internal compiler error: in write_builtin_type, at cp/mangle.c:2168
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
Preprocessed source stored into /tmp/ccoYSkon.out file, please attach this to your bugreport.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: gcc-arm-linux-gnueabi 4:4.6.2-7
ProcVersionSignature: Ubuntu 3.2.0-26.41-generic 3.2.19
Uname: Linux 3.2.0-26-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu9
Architecture: amd64
Date: Mon Jun 18 15:51:06 2012
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
SourcePackage: gcc-defaults-armel-cross
UpgradeStatus: Upgraded to precise on 2012-02-18 (120 days ago)

Stefan Beller (stefanbeller) wrote :
Stefan Beller (stefanbeller) wrote :
Stefan Beller (stefanbeller) wrote :
Dave Gilbert (ubuntu-treblig) wrote :

On Quantal, this happens on arm-linux-gnueabi-g++-4.6 but not 4.7

dg@major:~/Downloads$ arm-linux-gnueabi-g++-4.7 -g --static -W -Wall -Wextra -std=c++0x -pedantic -pedantic-errors -ofast -ftree-vectorize -fno-exceptions -fno-rtti -ffast-math -flto -funsafe-loop-optimizations -Wunsafe-loop-optimizations -fmodulo-sched -fsched-spec-load -ftracer testclass.cpp -o bugreport
dg@major:~/Downloads$ arm-linux-gnueabi-g++-4.6 -g --static -W -Wall -Wextra -std=c++0x -pedantic -pedantic-errors -ofast -ftree-vectorize -fno-exceptions -fno-rtti -ffast-math -flto -funsafe-loop-optimizations -Wunsafe-loop-optimizations -fmodulo-sched -fsched-spec-load -ftracer testclass.cpp -o bugreport
In file included from /usr/arm-linux-gnueabi/include/c++/4.6.3/bits/basic_string.h:2974:0,
                 from /usr/arm-linux-gnueabi/include/c++/4.6.3/string:54,
                 from /usr/arm-linux-gnueabi/include/c++/4.6.3/bits/locale_classes.h:42,
                 from /usr/arm-linux-gnueabi/include/c++/4.6.3/bits/ios_base.h:43,
                 from /usr/arm-linux-gnueabi/include/c++/4.6.3/ios:43,
                 from /usr/arm-linux-gnueabi/include/c++/4.6.3/ostream:40,
                 from /usr/arm-linux-gnueabi/include/c++/4.6.3/iostream:40,
                 from testclass.cpp:4:
/usr/arm-linux-gnueabi/include/c++/4.6.3/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]’:
testclass.cpp:40:1: instantiated from here
/usr/arm-linux-gnueabi/include/c++/4.6.3/bits/functional_hash.h:184:5: internal compiler error: in write_builtin_type, at cp/mangle.c:2168
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
Preprocessed source stored into /tmp/cctWjhp9.out file, please attach this to your bugreport.

Changed in gcc-defaults-armel-cross (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Dave Gilbert (ubuntu-treblig) wrote :

since it's 4.6 on both Precise (as per original report) and on Quantal seems more appropriate here.

affects: gcc-defaults-armel-cross (Ubuntu) → gcc-4.6-armel-cross (Ubuntu)
Marcin Juszkiewicz (hrw) wrote :

Also affects g++ on armhf/precise:

root@ubuntu:~# g++ -g --static -W -Wall -Wextra -std=c++0x -pedantic -pedantic-errors -ofast -ftree-vectorize -fno-exceptions -fno-rtti -ffast-math -flto -funsafe-loop-optimizations -Wunsafe-loop-optimizations -fmodulo-sched -fsched-spec-load -ftracer testclass.cpp -o bugreport
In file included from /usr/include/c++/4.6/bits/basic_string.h:2974:0,
                 from /usr/include/c++/4.6/string:54,
                 from /usr/include/c++/4.6/bits/locale_classes.h:42,
                 from /usr/include/c++/4.6/bits/ios_base.h:43,
                 from /usr/include/c++/4.6/ios:43,
                 from /usr/include/c++/4.6/ostream:40,
                 from /usr/include/c++/4.6/iostream:40,
                 from testclass.cpp:4:
/usr/include/c++/4.6/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]':
testclass.cpp:40:1: instantiated from here
/usr/include/c++/4.6/bits/functional_hash.h:184:5: internal compiler error: in write_builtin_type, at cp/mangle.c:2168
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
Preprocessed source stored into /tmp/ccXcfMvM.out file, please attach this to your bugreport.

Changed in gcc-4.6 (Ubuntu):
status: New → Triaged
Marcin Juszkiewicz (hrw) wrote :

Also happens with 4.6/quantal/armhf

summary: - arm-linux-gnueabi crashes with "Please submit a full bug report, with
- preprocessed source if appropriate."
+ /usr/arm-linux-gnueabi/include/c++/4.6.3/bits/functional_hash.h:184:5:
+ internal compiler error: in write_builtin_type, at cp/mangle.c:2168
Changed in gcc-4.6 (Ubuntu):
importance: Undecided → Medium
Matthias Klose (doko) wrote :

fixed in 4.7, opening a gcc-linaro task, but I assume this will end up as won't fix.

Changed in gcc-4.7 (Ubuntu):
importance: Undecided → Medium
status: New → Fix Released
Zhenqiang Chen (zhenqiang-chen) wrote :

Thank you for the bug report. I've confirmed this with gcc-linaro-4.6-2012.08 on ARM:

./arm-linux-gnueabi-g++ -g --static -W -Wall -Wextra -std=c++0x -pedantic -pedantic-errors -ofast -ftree-vectorize -fno-exceptions -fno-rtti -ffast-math -flto -funsafe-loop-optimizations -Wunsafe-loop-optimizations -fmodulo-sched -fsched-spec-load -ftracer testclass.cpp
In file included from /home/zheche01/gcc-linaro-arm-linux-gnueabi-2012.08/bin/../lib/gcc/arm-linux-gnueabi/4.6.4/../../../../arm-linux-gnueabi/include/c++/4.6.4/bits/basic_string.h:2974:0,
                 from /home/zheche01/gcc-linaro-arm-linux-gnueabi-2012.08/bin/../lib/gcc/arm-linux-gnueabi/4.6.4/../../../../arm-linux-gnueabi/include/c++/4.6.4/string:54,
                 from /home/zheche01/gcc-linaro-arm-linux-gnueabi-2012.08/bin/../lib/gcc/arm-linux-gnueabi/4.6.4/../../../../arm-linux-gnueabi/include/c++/4.6.4/bits/locale_classes.h:42,
                 from /home/zheche01/gcc-linaro-arm-linux-gnueabi-2012.08/bin/../lib/gcc/arm-linux-gnueabi/4.6.4/../../../../arm-linux-gnueabi/include/c++/4.6.4/bits/ios_base.h:43,
                 from /home/zheche01/gcc-linaro-arm-linux-gnueabi-2012.08/bin/../lib/gcc/arm-linux-gnueabi/4.6.4/../../../../arm-linux-gnueabi/include/c++/4.6.4/ios:43,
                 from /home/zheche01/gcc-linaro-arm-linux-gnueabi-2012.08/bin/../lib/gcc/arm-linux-gnueabi/4.6.4/../../../../arm-linux-gnueabi/include/c++/4.6.4/ostream:40,
                 from /home/zheche01/gcc-linaro-arm-linux-gnueabi-2012.08/bin/../lib/gcc/arm-linux-gnueabi/4.6.4/../../../../arm-linux-gnueabi/include/c++/4.6.4/iostream:40,
                 from t3.cpp:4:
/home/zheche01/gcc-linaro-arm-linux-gnueabi-2012.08/bin/../lib/gcc/arm-linux-gnueabi/4.6.4/../../../../arm-linux-gnueabi/include/c++/4.6.4/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]’:
t3.cpp:40:1: instantiated from here
/home/zheche01/gcc-linaro-arm-linux-gnueabi-2012.08/bin/../lib/gcc/arm-linux-gnueabi/4.6.4/../../../../arm-linux-gnueabi/include/c++/4.6.4/bits/functional_hash.h:184:5: internal compiler error: in write_builtin_type, at cp/mangle.c:2168
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.launchpad.net/gcc-linaro> for instructions.

I can not reproduce this with gcc-linaro-4.7-2012.08 on ARM

Reproduce this with FSF gcc-4.6.3.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51432 records the issue.

c++0x is experimental in 4.6 and mildly less experimental in 4.7.

For this case, you can workaround it with no -std=c++0x or -flto.

I've set it to low priority as it uses experimental feature, has work around, exists upstream, and 4.7 clears the problem.

Changed in gcc-linaro:
importance: Undecided → Low
status: New → Triaged
Victor Chong (vchong) wrote :

4.6 no longer supported and fixed in 4.7.

Changed in gcc-linaro:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.