https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122371
Bug ID: 122371
Summary: [16 regression] ICE when building lapack-3.12.1
Product: gcc
Version: 16.0
Status: UNCONFIRMED
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 62601
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=62601&action=edit
zlatrs.f-pp.f.xz
```
$ gfortran -c zlatrs.f-pp.f -O2 -march=x86-64-v3
during GIMPLE pass: vect
/var/tmp/portage/sci-libs/lapack-3.12.1-r2/work/lapack-3.12.1_build/SRC/lapack_64_obj/zlatrs.f:238:7:
238 | SUBROUTINE ZLATRS( UPLO, TRANS, DIAG, NORMIN, N, A, LDA, X,
| ^~~~~~~~~~~~~~~~~~~~
internal compiler error: Segmentation fault
0x55f269e44c5b internal_error(char const*, ...)
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/diagnostic-global-context.cc:787
0x55f2696869ac crash_signal
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/toplev.cc:323
0x55f26942e594 vect_orig_stmt(_stmt_vec_info*)
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/tree-vectorizer.h:1963
0x55f26942e594 vectorize_fold_left_reduction
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/tree-vect-loop.cc:6423
0x55f26942e594 vect_transform_reduction(_loop_vec_info*, _stmt_vec_info*,
gimple_stmt_iterator*, _slp_tree*)
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/tree-vect-loop.cc:7925
0x55f26a587b3c vect_transform_stmt(vec_info*, _stmt_vec_info*,
gimple_stmt_iterator*, _slp_tree*, _slp_instance*)
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/tree-vect-stmts.cc:12999
0x55f26a8fd43d vect_schedule_slp_node
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/tree-vect-slp.cc:11759
0x55f26a8fd43d vect_schedule_slp_node
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/tree-vect-slp.cc:11533
0x55f26a8fd101 vect_schedule_scc
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/tree-vect-slp.cc:12060
0x55f26a5804a9 vect_schedule_slp(vec_info*, vec<_slp_instance*, va_heap,
vl_ptr> const&)
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/tree-vect-slp.cc:12153
0x55f26aa09b9c vect_transform_loop(_loop_vec_info*, gimple*)
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/tree-vect-loop.cc:11171
0x55f26aa094f6 vect_transform_loops
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/tree-vectorizer.cc:1036
0x55f26a91cc72 try_vectorize_loop_1
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/tree-vectorizer.cc:1185
0x55f26a91cc72 try_vectorize_loop
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/tree-vectorizer.cc:1215
0x55f26a57ddd4 execute
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/tree-vectorizer.cc:1331
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/16/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-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,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,df --with-bugurl=https://bugs.gentoo.org/
--with-pkgversion='Gentoo 16.0.9999 p, commit
f7ce4f0367ea98c32b658547d6206523358c3b19' --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 --enable-cet --disable-systemtap --enable-valgrind-annotations
--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 --disable-libgdiagnostics
--with-build-config='bootstrap-lto bootstrap-cet'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 16.0.0 20251021 (experimental)
99b548951fe68ffe999a96e1123faec6bfda5fa6 (Gentoo 16.0.9999 p, commit
f7ce4f0367ea98c32b658547d6206523358c3b19)
```