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

            Bug ID: 119687
           Summary: ICE when building kwin-6.3.4 against qt-6.9 (in
                    operator*, at cp/cp-tree.h:876)
           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: ---

Created attachment 61043
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61043&action=edit
3XaKuWZl.ii.xz

This is with C++23 only which is experimental but I think it's important given
kwin/qt are major.

Reported by Paul Zander.

```
$ g++ -c -march=znver3 3XaKuWZl.ii -std=gnu++23 -mshstk -O3
/usr/include/qt6/QtCore/qdebug.h:683:21: internal compiler error: in operator*,
at cp/cp-tree.h:876
0x59bb46756232 internal_error(char const*, ...)
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/diagnostic-global-context.cc:517
0x59bb467563cd fancy_abort(char const*, int, char const*)
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/diagnostic.cc:1749
0x59bb44c7c25c ovl_iterator::operator*() const [clone .isra.0]
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cp/cp-tree.h:876
0x59bb45d051b8 alias_ctad_tweaks
        /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cp/pt.cc:30928
0x59bb45d06f19 inherited_ctad_tweaks
        /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cp/pt.cc:31149
0x59bb45d06f19 ctor_deduction_guides_for
        /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cp/pt.cc:31280
0x59bb45d06f19 deduction_guides_for
        /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cp/pt.cc:31357
0x59bb455dc3e7 do_class_deduction
        /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cp/pt.cc:31524
0x59bb455dc3e7 do_auto_deduction(tree_node*, tree_node*, tree_node*, int,
auto_deduction_context, tree_node*, int, tree_node*)
        /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cp/pt.cc:31738
0x59bb4528feff build_functional_cast_1
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cp/typeck2.cc:2522
0x59bb46d926fc build_functional_cast(unsigned long, tree_node*, tree_node*,
int)
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cp/typeck2.cc:2613
0x59bb46cc03e4 tsubst_expr(tree_node*, tree_node*, int, tree_node*)
        /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cp/pt.cc:20740
0x59bb46cc18a6 tsubst_expr(tree_node*, tree_node*, int, tree_node*)
        /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cp/pt.cc:20871
0x59bb46f825d0 tsubst_stmt
        /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cp/pt.cc:20001
0x59bb46f826c3 tsubst_stmt
        /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cp/pt.cc:18864
0x59bb46f82715 tsubst_stmt
        /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cp/pt.cc:19219
0x59bb46e9a505 instantiate_body
        /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cp/pt.cc:27716
0x59bb46e98b5b instantiate_decl(tree_node*, bool, bool)
        /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cp/pt.cc:28000
0x59bb4695a07a instantiate_pending_templates(int)
        /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cp/pt.cc:28077
0x59bb4694cba1 c_parse_final_cleanups()
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cp/decl2.cc:5571
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.
```

---

```

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/15/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.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/15
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/15/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/15
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/15/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/15/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15
--disable-silent-rules --disable-dependency-tracking
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/15/python
--enable-libphobos --enable-objc-gc
--enable-languages=c,c++,d,go,objc,obj-c++,fortran,ada,cobol,m2,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 15.0.9999 p, commit
3c997ffed4de1d98d745b63d1ef95342800c52f1' --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-offload-defaulted
--enable-offload-targets=nvptx-none --enable-libgomp --disable-libssp
--enable-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-gxx-libcxx-include-dir=/usr/include/c++/v1
--with-build-config='bootstrap-O3 bootstrap-lto'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 15.0.1 20250408 (experimental)
29ed33631f0eb4c88c8b253d5245958304102217 (Gentoo Hardened 15.0.9999 p, commit
3c997ffed4de1d98d745b63d1ef95342800c52f1)
```

Reply via email to