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

            Bug ID: 122372
           Summary: [16 regression] ICE when building lame-3.100 (crash in
                    vect_orig_stmt)
           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: ---

This may just be a C testcase for PR122371 but figured I'd file it separately
as I prefer marking it as a dupe than splitting it out if it turns out to be
different.

```
$ gcc -c gain_analysis.i -O2
during GIMPLE pass: vect
gain_analysis.i: In function ‘AnalyzeSamples’:
gain_analysis.i:9:6: internal compiler error: Segmentation fault
    9 | void AnalyzeSamples() {
      |      ^~~~~~~~~~~~~~
0x5625c718ce4a internal_error(char const*, ...)
       
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/diagnostic-global-context.cc:787
0x5625c69c9231 crash_signal
        /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/toplev.cc:323
0x5625c6732db3 vect_orig_stmt(_stmt_vec_info*)
       
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/tree-vectorizer.h:1963
0x5625c6732db3 vectorize_fold_left_reduction
       
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/tree-vect-loop.cc:6423
0x5625c6732db3 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
0x5625c791f6fc 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
0x5625c7cdc3ad vect_schedule_slp_node
       
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/tree-vect-slp.cc:11759
0x5625c7cdc3ad vect_schedule_slp_node
       
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/tree-vect-slp.cc:11533
0x5625c7cdc07d vect_schedule_scc
       
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/tree-vect-slp.cc:12060
0x5625c79180d9 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
0x5625c7de9dfc 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
0x5625c7de9776 vect_transform_loops
       
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/tree-vectorizer.cc:1036
0x5625c7cfd2ad try_vectorize_loop_1
       
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/tree-vectorizer.cc:1185
0x5625c7cfd2ad try_vectorize_loop
       
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/tree-vectorizer.cc:1215
0x5625c7915ab6 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)
```

Reply via email to