https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126979
Bug ID: 126979
Summary: [17 regression] ICE when building numpy-2.5.2
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: sjames at gcc dot gnu.org
Target Milestone: ---
Created attachment 65382
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65382&action=edit
_pocketfft_umath.cpp.ii.xz
```
$ g++ -c
./numpy/fft/_pocketfft_umath.cpython-312-x86_64-linux-gnu.so.p/_pocketfft_umath.cpp.ii
-O2 -march=znver3 -mshstk
during GIMPLE pass: vect
In file included from ../numpy-2.5.2/numpy/fft/_pocketfft_umath.cpp:24:
../numpy-2.5.2/numpy/fft/pocketfft/pocketfft_hdronly.h: In member function
‘void pocketfft::detail::rfftp<T0>::exec(T*, T0, bool) const [with T = double;
T0 = double]’:
../numpy-2.5.2/numpy/fft/pocketfft/pocketfft_hdronly.h:2279:31: internal
compiler error: Segmentation fault
2279 | template<typename T> void exec(T c[], T0 fct, bool r2hc) const
| ^~~~
0x559913b26188 internal_error(char const*, ...)
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/diagnostic-global-context.cc:787
0x55991331e24f crash_signal
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/toplev.cc:325
0x7fe405e454df ???
/usr/src/debug/sys-libs/glibc-2.43.9999/glibc-2.43.9999/signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0x5599133a3176 compatible_complex_nodes_p
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/tree-vect-slp-patterns.cc:766
0x5599133a3333 compatible_complex_nodes_p
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/tree-vect-slp-patterns.cc:833
0x5599133a3653 vect_validate_multiplication
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/tree-vect-slp-patterns.cc:929
0x5599133a3653 vect_validate_multiplication_commutative(hash_map<_slp_tree*,
_complex_perm_kinds, simple_hashmap_traits<default_hash_traits<_slp_tree*>,
_complex_perm_kinds> >*, hash_map<pair_hash<nofree_ptr_hash<_slp_tree>,
nofree_ptr_hash<_slp_tree> >, bool,
simple_hashmap_traits<default_hash_traits<pair_hash<nofree_ptr_hash<_slp_tree>,
nofree_ptr_hash<_slp_tree> > >, bool> >*, vec<_slp_tree*, va_heap, vl_ptr>&,
vec<_slp_tree*, va_heap, vl_ptr>&, bool, vec<_slp_tree*, va_heap, vl_ptr>&,
_conj_status*) [clone .constprop.0] [clone .isra.0]
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/tree-vect-slp-patterns.cc:961
0x5599127f5ba8 complex_mul_pattern::matches(_complex_operation,
hash_map<_slp_tree*, _complex_perm_kinds,
simple_hashmap_traits<default_hash_traits<_slp_tree*>, _complex_perm_kinds> >*,
hash_map<pair_hash<nofree_ptr_hash<_slp_tree>, nofree_ptr_hash<_slp_tree> >,
bool,
simple_hashmap_traits<default_hash_traits<pair_hash<nofree_ptr_hash<_slp_tree>,
nofree_ptr_hash<_slp_tree> > >, bool> >*, _slp_tree**, vec<_slp_tree*, va_heap,
vl_ptr>*)
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/tree-vect-slp-patterns.cc:1115
0x559914696355 complex_mul_pattern::matches(_complex_operation,
hash_map<_slp_tree*, _complex_perm_kinds,
simple_hashmap_traits<default_hash_traits<_slp_tree*>, _complex_perm_kinds> >*,
hash_map<pair_hash<nofree_ptr_hash<_slp_tree>, nofree_ptr_hash<_slp_tree> >,
bool,
simple_hashmap_traits<default_hash_traits<pair_hash<nofree_ptr_hash<_slp_tree>,
nofree_ptr_hash<_slp_tree> > >, bool> >*, _slp_tree**, vec<_slp_tree*, va_heap,
vl_ptr>*)
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/tree-vect-slp-patterns.cc:662
0x559914696355 complex_operations_pattern::recognize(hash_map<_slp_tree*,
_complex_perm_kinds, simple_hashmap_traits<default_hash_traits<_slp_tree*>,
_complex_perm_kinds> >*, hash_map<pair_hash<nofree_ptr_hash<_slp_tree>,
nofree_ptr_hash<_slp_tree> >, bool,
simple_hashmap_traits<default_hash_traits<pair_hash<nofree_ptr_hash<_slp_tree>,
nofree_ptr_hash<_slp_tree> > >, bool> >*, _slp_tree**)
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/tree-vect-slp-patterns.cc:1556
0x559914691d35 vect_match_slp_patterns_2
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/tree-vect-slp.cc:3932
0x559914691cb3 vect_match_slp_patterns_2
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/tree-vect-slp.cc:3925
0x5599146678cd vect_match_slp_patterns
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/tree-vect-slp.cc:3964
0x5599146678cd vect_analyze_slp(vec_info*, unsigned int, bool)
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/tree-vect-slp.cc:6063
0x559914897c26 vect_analyze_loop_2
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/tree-vect-loop.cc:2288
0x559914c733eb vect_analyze_loop_1
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/tree-vect-loop.cc:2821
0x55991487f03f vect_analyze_loop(loop*, gimple*, vec_info_shared*)
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/tree-vect-loop.cc:3002
0x559914c71b4c try_vectorize_loop_1
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/tree-vectorizer.cc:1099
0x559914c71b4c try_vectorize_loop
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/tree-vectorizer.cc:1218
0x559914762c7b execute
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/tree-vectorizer.cc:1335
/usr/libexec/gcc/x86_64-pc-linux-gnu/17/cc1plus -fpreprocessed
./numpy/fft/_pocketfft_umath.cpython-312-x86_64-linux-gnu.so.p/_pocketfft_umath.cpp.ii
-quiet -dumpbase _pocketfft_umath.cpp.ii -dumpbase-ext .ii -march=znver3
-mshstk -mtls-dialect=gnu2 -O2 -foffload-options=-fno-stack-protector
-fcf-protection -foffload-options=-fcf-protection=none -o /tmp/cchElWzX.s
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
```
```
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/17/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-17.0.9999/work/gcc-17.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/17
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/17/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/17
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/17/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/17/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/17/include/g++-v17
--disable-silent-rules --disable-dependency-tracking
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/17/python
--enable-libphobos --enable-objc-gc
--enable-languages=c,c++,d,objc,obj-c++,fortran,ada,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 17.0.9999 p, commit
cb0bef329c3c99175a317e206f3e376f2fb6690d' --with-gcc-major-version-only
--enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch
--enable-linker-build-id --enable-libada --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-cet --disable-systemtap --enable-valgrind-annotations
--enable-valgrind-interop --disable-vtable-verify --disable-libvtv --with-zstd
--without-isl --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 bootstrap-cet'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 17.0.0 20260820 (experimental)
579349b0f12681ffcbfd14eafe6efdc8da67a1f2 (Gentoo 17.0.9999 p, commit
cb0bef329c3c99175a317e206f3e376f2fb6690d)
```