https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113332
Bug ID: 113332 Summary: [12/13/14 regression] ICE when building fcitx-5.1.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 57038 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57038&action=edit ibusfrontend.cpp.ii.xz Originally reported downstream by Toralf Förster at https://bugs.gentoo.org/921765 with GCC 13 (13.2.1 20231216) but I can reproduce it with 14 (14.0.0 20240107) too. ``` $ g++ -c ibusfrontend.cpp.ii In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/unique_ptr.h:37, from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/memory:78, from /var/tmp/portage/app-i18n/fcitx-5.1.6/work/fcitx5-5.1.6/src/lib/fcitx/../fcitx-utils/dbus/servicewatcher.h:10, from /var/tmp/portage/app-i18n/fcitx-5.1.6/work/fcitx5-5.1.6/src/frontend/ibusfrontend/ibusfrontend.h:11, from /var/tmp/portage/app-i18n/fcitx-5.1.6/work/fcitx5-5.1.6/src/frontend/ibusfrontend/ibusfrontend.cpp:8: /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/tuple: In substitution of ‘template<class _Dummy, typename std::enable_if<std::tuple<std::vector<fcitx::dbus::DBusStruct<unsigned char, fcitx::dbus::Variant>, std::allocator<fcitx::dbus::DBusStruct<unsigned char, fcitx::dbus::Variant> > > >::_TCC<std::is_void<_Tp>::value>::__is_implicitly_default_constructible(), bool>::type <anonymous> > constexpr std::tuple<std::vector<fcitx::dbus::DBusStruct<unsigned char, fcitx::dbus::Variant>, std::allocator<fcitx::dbus::DBusStruct<unsigned char, fcitx::dbus::Variant> > > >::tuple() [with _Dummy = void; typename std::enable_if<std::tuple<std::vector<fcitx::dbus::DBusStruct<unsigned char, fcitx::dbus::Variant>, std::allocator<fcitx::dbus::DBusStruct<unsigned char, fcitx::dbus::Variant> > > >::_TCC<std::is_void<_Tp>::value>::__is_implicitly_default_constructible(), bool>::type <anonymous> = <missing>]’: /var/tmp/portage/app-i18n/fcitx-5.1.6/work/fcitx5-5.1.6/src/frontend/ibusfrontend/ibusfrontend.cpp:594:0: recursively required from ‘constexpr fcitx::dbus::DBusStruct<Args>::DBusStruct() [with Args = {std::vector<fcitx::dbus::DBusStruct<unsigned char, fcitx::dbus::Variant>, std::allocator<fcitx::dbus::DBusStruct<unsigned char, fcitx::dbus::Variant> > >}]’ 594 | FCITX_OBJECT_VTABLE_PROPERTY( /var/tmp/portage/app-i18n/fcitx-5.1.6/work/fcitx5-5.1.6/src/frontend/ibusfrontend/ibusfrontend.cpp:594:0: required from here /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/tuple:763:62: internal compiler error: in lambda_expr_this_capture, at cp/lambda.cc:825 763 | _TCC<_Dummy>::__is_implicitly_default_constructible(), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ 0x55781543e3c2 lambda_expr_this_capture(tree_node*, int) /usr/src/debug/sys-devel/gcc-14.0.0_pre20240107/gcc-14-20240107/gcc/cp/lambda.cc:825 0x5578166f2080 maybe_dummy_object(tree_node*, tree_node**) /usr/src/debug/sys-devel/gcc-14.0.0_pre20240107/gcc-14-20240107/gcc/cp/tree.cc:4408 0x5578165d0e8e finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool, bool, int) /usr/src/debug/sys-devel/gcc-14.0.0_pre20240107/gcc-14-20240107/gcc/cp/semantics.cc:2968 0x55781678c531 tsubst_expr(tree_node*, tree_node*, int, tree_node*) /usr/src/debug/sys-devel/gcc-14.0.0_pre20240107/gcc-14-20240107/gcc/cp/pt.cc:20845 0x5578167bc701 tsubst_template_arg(tree_node*, tree_node*, int, tree_node*) /usr/src/debug/sys-devel/gcc-14.0.0_pre20240107/gcc-14-20240107/gcc/cp/pt.cc:12693 0x5578167bc701 tsubst_template_arg(tree_node*, tree_node*, int, tree_node*) /usr/src/debug/sys-devel/gcc-14.0.0_pre20240107/gcc-14-20240107/gcc/cp/pt.cc:12681 0x5578167bc701 tsubst_template_args(tree_node*, tree_node*, int, tree_node*) /usr/src/debug/sys-devel/gcc-14.0.0_pre20240107/gcc-14-20240107/gcc/cp/pt.cc:13845 0x557816831076 tsubst_aggr_type_1 /usr/src/debug/sys-devel/gcc-14.0.0_pre20240107/gcc-14-20240107/gcc/cp/pt.cc:14120 0x557816831076 tsubst_aggr_type /usr/src/debug/sys-devel/gcc-14.0.0_pre20240107/gcc-14-20240107/gcc/cp/pt.cc:14090 0x5578167093ed tsubst(tree_node*, tree_node*, int, tree_node*) /usr/src/debug/sys-devel/gcc-14.0.0_pre20240107/gcc-14-20240107/gcc/cp/pt.cc:16666 0x557816a1a5e2 type_unification_real /usr/src/debug/sys-devel/gcc-14.0.0_pre20240107/gcc-14-20240107/gcc/cp/pt.cc:23316 0x557816a18cb7 fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node* const*, unsigned int, tree_node*, unification_kind_t, int, conversion**, bool, bool) /usr/src/debug/sys-devel/gcc-14.0.0_pre20240107/gcc-14-20240107/gcc/cp/pt.cc:22390 0x557816a17a82 add_template_candidate_real(z_candidate**, tree_node*, tree_node*, tree_node*, tree_node*, vec<tree_node*, va_gc, vl_embed> const*, tree_node*, tree_node*, tree_node*, int, tree_node*, unification_kind_t, bool, int) [clone .isra.0] /usr/src/debug/sys-devel/gcc-14.0.0_pre20240107/gcc-14-20240107/gcc/cp/call.cc:3631 0x5578165de1b0 add_template_candidate /usr/src/debug/sys-devel/gcc-14.0.0_pre20240107/gcc-14-20240107/gcc/cp/call.cc:3721 0x5578165de1b0 add_candidates /usr/src/debug/sys-devel/gcc-14.0.0_pre20240107/gcc-14-20240107/gcc/cp/call.cc:6686 0x5578168bf6e1 build_new_method_call(tree_node*, tree_node*, vec<tree_node*, va_gc, vl_embed>**, tree_node*, int, tree_node**, int) /usr/src/debug/sys-devel/gcc-14.0.0_pre20240107/gcc-14-20240107/gcc/cp/call.cc:11678 0x557816ce53ee locate_fn_flags /usr/src/debug/sys-devel/gcc-14.0.0_pre20240107/gcc-14-20240107/gcc/cp/method.cc:1964 0x5578166d487d walk_field_subobs /usr/src/debug/sys-devel/gcc-14.0.0_pre20240107/gcc-14-20240107/gcc/cp/method.cc:2555 0x557816c84683 synthesized_method_walk /usr/src/debug/sys-devel/gcc-14.0.0_pre20240107/gcc-14-20240107/gcc/cp/method.cc:2835 0x557816daea87 get_defaulted_eh_spec(tree_node*, int) /usr/src/debug/sys-devel/gcc-14.0.0_pre20240107/gcc-14-20240107/gcc/cp/method.cc:2877 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.0_pre20240107/work/gcc-14-20240107/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 --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.0_pre20240107 p15' --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.0 20240107 (experimental) (Gentoo Hardened 14.0.0_pre20240107 p15) ```