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

            Bug ID: 123347
           Summary: [16 regression] ICE when building libprojectm-3.1.12
                    (tree check: expected record_type or union_type or
                    qual_union_type, have pointer_type in
                    potential_constant_expression_1, at
                    cp/constexpr.cc:12075)
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: ice-checking, ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

```
namespace std {
struct type_info {
  bool operator==(type_info) const;
};
} // namespace std
template <class> struct RenderItemMerge {
  virtual void operator0() { 0 && typeid(&supported_r2) == typeid(int); }
  int supported_r2;
};
struct ShapeMerge : RenderItemMerge<int> {
  ShapeMerge() {}
};
```

```
$ g++ -c projectM.ii -std=c++14
projectM.ii: In instantiation of ‘void RenderItemMerge<
<template-parameter-1-1> >::operator0() [with <template-parameter-1-1> = int]’:
required from here
projectM.ii:7:16:
    7 |   virtual void operator0() { 0 && typeid(&supported_r2) == typeid(int);
}
      |                ^~~~~~~~~
projectM.ii:7:35: internal compiler error: tree check: expected record_type or
union_type or qual_union_type, have pointer_type in
potential_constant_expression_1, at cp/constexpr.cc:12075
    7 |   virtual void operator0() { 0 && typeid(&supported_r2) == typeid(int);
}
      |                                   ^~~~~~~~~~~~~~~~~~~~~
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
```

```
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/16/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-pc-linux-gnu
Configured with:
/var/tmp/portage.notmp/portage/sys-devel/gcc-16.0.9999/work/gcc-16.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/16
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/16/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/16
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/16/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/16/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/16/include/g++-v16
--disable-silent-rules --disable-dependency-tracking
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/16/python
--enable-libphobos --enable-objc-gc
--enable-languages=c,c++,d,go,objc,obj-c++,fortran,ada,cobol,algol68,m2,rust,jit
--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 16.0.9999 p, commit
329fe436906e90cbe1d2f787ad5a282160589518' --with-gcc-major-version-only
--enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--with-tls=gnu2 --enable-multilib --with-multilib-list=m32,mx32,m64
--disable-fixed-point --with-abi=m64 --enable-targets=all
--enable-offload-defaulted --enable-offload-targets=nvptx-none --enable-libgomp
--disable-libssp --enable-libada --disable-cet --enable-systemtap
--enable-valgrind-annotations --enable-valgrind-interop --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 --enable-host-shared
--enable-libgdiagnostics --enable-linker-build-id --enable-linker-build-id
--enable-linker-build-id --enable-linker-build-id
--with-build-config='bootstrap-O3 bootstrap-lto'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 16.0.0 20251229 (experimental)
cc515677b95d292d619c1fe6748a0d91385ca3ff (Gentoo Hardened 16.0.9999 p, commit
329fe436906e90cbe1d2f787ad5a282160589518)
```

Reply via email to