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

            Bug ID: 118199
           Summary: [15 regression] ICE when building widelands-1.2.1
                    (with -fno-elide-constructors)
           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/946900.

```
$ g++ -c ./src/logic/CMakeFiles/logic_addons.dir/addons.cc.ii
-fno-elide-constructors
In file included from
/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/hashtable.h:37,
                 from
/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/unordered_map.h:33,
                 from
/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/unordered_map:43,
                 from
/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/functional:65,
                 from
/var/tmp/portage/games-strategy/widelands-1.2.1/work/widelands-1.2.1/src/logic/addons.h:23,
                 from
/var/tmp/portage/games-strategy/widelands-1.2.1/work/widelands-1.2.1/src/logic/addons.cc:19:
/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/hashtable_policy.h: In
constructor
‘std::__detail::_Hashtable_alloc<_NodeAlloc>::_Hashtable_alloc(_Alloc&&) [with
_Alloc = std::a
llocator<std::__detail::_Hash_node<std::pair<const
std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >, true> >;
_NodeAlloc = std::allocator<std::__detail::_Hash_node<st
d::pair<const std::__cxx11::basic_string<char>,
std::__cxx11::basic_string<char> >, true> >]’:
/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/hashtable_policy.h:1522:11:
internal compiler error: in cp_gimplify_expr, at cp/cp-gimplify.cc:911
 1522 |         : _M_alloc{std::forward<_Alloc>(__a)}
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0x5ed25b18940c internal_error(char const*, ...)
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/diagnostic-global-context.cc:517
0x5ed25b1895a7 fancy_abort(char const*, int, char const*)
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/diagnostic.cc:1722
0x5ed2599b4530 cp_gimplify_expr(tree_node**, gimple**, gimple**)
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cp/cp-gimplify.cc:911
0x5ed25b355398 gimplify_expr(tree_node**, gimple**, gimple**, bool
(*)(tree_node*), int)
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/gimplify.cc:18722
0x5ed25b411c9a gimplify_addr_expr
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/gimplify.cc:7323
0x5ed25b355920 gimplify_expr(tree_node**, gimple**, gimple**, bool
(*)(tree_node*), int)
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/gimplify.cc:18863
0x5ed25b40f35a gimplify_expr
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/gimplify.cc:19907
0x5ed25b40f35a gimplify_arg(tree_node**, gimple**, unsigned long, bool)
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/gimplify.cc:3827
0x5ed25b40f35a gimplify_call_expr
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/gimplify.cc:4369
0x5ed25b3563e1 gimplify_expr(tree_node**, gimple**, gimple**, bool
(*)(tree_node*), int)
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/gimplify.cc:18785
0x5ed25b354926 gimplify_stmt(tree_node**, gimple**)
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/gimplify.cc:7999
0x5ed25b35669a gimplify_cleanup_point_expr
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/gimplify.cc:7737
0x5ed25b35669a gimplify_expr(tree_node**, gimple**, gimple**, bool
(*)(tree_node*), int)
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/gimplify.cc:19215
0x5ed25b35683e gimplify_stmt(tree_node**, gimple**)
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/gimplify.cc:7999
0x5ed25b35683e gimplify_statement_list
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/gimplify.cc:2280
0x5ed25b35683e gimplify_expr(tree_node**, gimple**, gimple**, bool
(*)(tree_node*), int)
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/gimplify.cc:19267
0x5ed25b354926 gimplify_stmt(tree_node**, gimple**)
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/gimplify.cc:7999
0x5ed25bc273f6 gimplify_bind_expr
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/gimplify.cc:1675
0x5ed25b356a24 gimplify_expr(tree_node**, gimple**, gimple**, bool
(*)(tree_node*), int)
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/gimplify.cc:19017
0x5ed25b354926 gimplify_stmt(tree_node**, gimple**)
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/gimplify.cc:7999
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-objc-gc --enable-languages=c,c++,d,go,objc,obj-c++,fortran,ada,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
01d33f6be28d09edb2e9aaa66feab7a1b359aa60' --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-build-config='bootstrap-O3 bootstrap-lto'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 15.0.0 20241222 (experimental)
cf59bf844037ae952f5058d0fd49e1f4f0cf907e (Gentoo Hardened 15.0.9999 p, commit
01d33f6be28d09edb2e9aaa66feab7a1b359aa60)
```

Reply via email to