https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113644

            Bug ID: 113644
           Summary: [14 regression] ICE when building libcxxabi-16.0.6
           Product: gcc
           Version: 14.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: ---

Created attachment 57246
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57246&action=edit
cxa_demangle.cpp.ii.xz

Originally reported downstream in Gentoo at https://bugs.gentoo.org/923111 by
Toralf Förster.

```
FAILED: libcxxabi/src/CMakeFiles/cxxabi_static_objects.dir/cxa_demangle.cpp.o
/usr/lib/ccache/bin/g++ -m32 -mfpmath=sse -DLIBCXX_BUILDING_LIBCXXABI
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LIBCPP_BUILDING_LIBRARY
-D_LIBCXXABI_BUILDING_LIBRARY -D__STDC_CONSTANT_MACROS -D__STDC_FORM
AT_MACROS -D__STDC_LIMIT_MACROS
-I/var/tmp/portage/sys-libs/libcxxabi-16.0.6/work/libcxxabi/../libcxx/src
-I/var/tmp/portage/sys-libs/libcxxabi-16.0.6/work/runtimes_build-abi_x86_32.x86/include/c++/v1
-I/var/
tmp/portage/sys-libs/libcxxabi-16.0.6/work/libcxxabi/include  -O3 -march=znver3
-fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra
-Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field
-initializers -Wimplicit-fallthrough -Wno-class-memaccess -Wno-redundant-move
-Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor
-Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wc
tad-maybe-unsupported -fdiagnostics-color -fdata-sections  -std=c++20
-fdiagnostics-color=always -nostdinc++ -Werror=return-type -W -Wall
-Wchar-subscripts -Wconversion -Wmismatched-tags -Wmissing-braces -Wun
used-function -Wshadow -Wsign-compare -Wsign-conversion -Wstrict-aliasing=2
-Wstrict-overflow=4 -Wunused-parameter -Wunused-variable -Wwrite-strings
-Wundef -Wno-suggest-override -Wno-error -pedantic -fstrict
-aliasing -D_DEBUG -MD -MT
libcxxabi/src/CMakeFiles/cxxabi_static_objects.dir/cxa_demangle.cpp.o -MF
libcxxabi/src/CMakeFiles/cxxabi_static_objects.dir/cxa_demangle.cpp.o.d -o
libcxxabi/src/CMakeFiles/cxxabi_
static_objects.dir/cxa_demangle.cpp.o -c
/var/tmp/portage/sys-libs/libcxxabi-16.0.6/work/libcxxabi/src/cxa_demangle.cpp
/var/tmp/portage/sys-libs/libcxxabi-16.0.6/work/libcxxabi/src/cxa_demangle.cpp:407:1:
internal compiler error: in comptypes, at cp/typeck.cc:1681
  407 | }  // __cxxabiv1
      | ^
0x559308a2e393 comptypes(tree_node*, tree_node*, int)
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/cp/typeck.cc:1681
0x55930a7f6476 unify
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/cp/pt.cc:24956
0x55930a7f60ad unify
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/cp/pt.cc:25009
0x55930a7f4ed6 get_partial_spec_bindings
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/cp/pt.cc:25893
0x55930a8755f0 most_specialized_partial_spec(tree_node*, int, bool)
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/cp/pt.cc:26190
0x5593098ca8f3 specialization_of
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/cp/parser.cc:34994
0x5593098ca8f3 class_decl_loc_t::diag_mismatched_tags(tree_node*)
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/cp/parser.cc:35178
0x559308abbd61 class_decl_loc_t::diag_mismatched_tags()
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/cp/parser.cc:35320
0x55930ac85c1c c_parse_file()
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/cp/parser.cc:51175
0x55930ac564e3 c_common_parse_file()
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/c-family/c-opts.cc:1301
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
```

```
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
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.0.1.9999/work/gcc-14.0.1.9999/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,rust --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--disable-libunwind-exceptions --enable-checking=yes,extra,rtl
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo Hardened
14.0.1 p, commit ddeac849ac4c3fecdf591ab6fb075cc6c5afdbff'
--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 --enable-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 --with-build-config='bootstrap-O3 bootstrap-lto
bootstrap-cet'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240127 (experimental)
ce61de1b8a1bb3a22118e900376f380768f2ba59 (Gentoo Hardened 14.0.1 p, commit
ddeac849ac4c3fecdf591ab6fb075cc6c5afdbff)
```

I can reproduce with just 'g++ cxa_demangle.cpp.ii -c -m32 -std=c++20
-Wmismatched-tags'.

Reply via email to