https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116929
Bug ID: 116929 Summary: ICE in write_unnamed_type_name when building redumper Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: sjames at gcc dot gnu.org Target Milestone: --- Originally reported downstream in Gentoo at https://bugs.gentoo.org/940571. 14 fails but 15 works. It came up when rebuilding 'redumper' in the wild. ``` $ make CXX=g++-14 g++-14 -flto=auto -ggdb -march=native -mtune=native -std=gnu++20 -fmodules-ts -fmodule-mapper=hex_bin.ixx.o.modmap -MD -fdeps-format=p1689r5 -x c++ -o hex_bin.ixx.o -c hex_bin.ixx.ii -freport-bug during IPA pass: *free_lang_data In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/cctype:42, from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/localefwd.h:42, from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/ios_base.h:40, from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/iomanip:42, from /var/tmp/portage/app-cdr/redumper-411/work/redumper-build_411/utils/hex_bin.ixx:4: /usr/include/ctype.h:47:1: internal compiler error: in write_unnamed_type_name, at cp/mangle.cc:1806 47 | { | ^ 0x56dd14565440 write_unnamed_type_name /usr/src/debug/sys-devel/gcc-14.2.1_p20240928/gcc-14-20240928/gcc/cp/mangle.cc:1806 0x56dd14565440 write_unqualified_name /usr/src/debug/sys-devel/gcc-14.2.1_p20240928/gcc-14-20240928/gcc/cp/mangle.cc:1589 0x56dd1500fe8e write_class_enum_type /usr/src/debug/sys-devel/gcc-14.2.1_p20240928/gcc-14-20240928/gcc/cp/mangle.cc:3096 0x56dd1500fe8e write_type /usr/src/debug/sys-devel/gcc-14.2.1_p20240928/gcc-14-20240928/gcc/cp/mangle.cc:2515 0x56dd15013c61 mangle_decl_string /usr/src/debug/sys-devel/gcc-14.2.1_p20240928/gcc-14-20240928/gcc/cp/mangle.cc:4418 0x56dd15014000 get_mangled_id /usr/src/debug/sys-devel/gcc-14.2.1_p20240928/gcc-14-20240928/gcc/cp/mangle.cc:4441 0x56dd15014000 mangle_decl(tree_node*) /usr/src/debug/sys-devel/gcc-14.2.1_p20240928/gcc-14-20240928/gcc/cp/mangle.cc:4479 0x56dd15e11ab8 decl_assembler_name(tree_node*) /usr/src/debug/sys-devel/gcc-14.2.1_p20240928/gcc-14-20240928/gcc/tree.cc:719 0x56dd15e11ab8 assign_assembler_name_if_needed(tree_node*) /usr/src/debug/sys-devel/gcc-14.2.1_p20240928/gcc-14-20240928/gcc/tree.cc:834 0x56dd16f1c083 free_lang_data_in_cgraph /usr/src/debug/sys-devel/gcc-14.2.1_p20240928/gcc-14-20240928/gcc/ipa-free-lang-data.cc:1064 0x56dd16f1c083 free_lang_data /usr/src/debug/sys-devel/gcc-14.2.1_p20240928/gcc-14-20240928/gcc/ipa-free-lang-data.cc:1109 0x56dd16f1c083 execute /usr/src/debug/sys-devel/gcc-14.2.1_p20240928/gcc-14-20240928/gcc/ipa-free-lang-data.cc:1176 Please submit a full bug report, with preprocessed source. Please include the complete backtrace with any bug report. See <https://bugs.gentoo.org/> for instructions. The bug is not reproducible, so it is likely a hardware or OS problem. make: *** [Makefile:2: all] Error 1 ``` -- ``` Using built-in specs. COLLECT_GCC=gcc-14 COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/14/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-14.2.1_p20240928/work/gcc-14-20240928/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/14 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/14/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14 --disable-silent-rules --disable-dependency-tracking --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/14/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --disable-nls --disable-libunwind-exceptions --enable-checking=yes,extra,rtl --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo Hardened 14.2.1_p20240928 p5' --with-gcc-major-version-only --enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-fixed-point --enable-targets=all --enable-libgomp --disable-libssp --disable-libada --disable-cet --disable-systemtap --enable-valgrind-annotations --disable-vtable-verify --disable-libvtv --with-zstd --with-isl --disable-isl-version-check --enable-default-pie --enable-host-pie --enable-host-bind-now --enable-default-ssp --disable-fixincludes --with-build-config=bootstrap-O3 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 14.2.1 20240928 (Gentoo Hardened 14.2.1_p20240928 p5) ```