https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118759
Bug ID: 118759 Summary: [15 regression] ICE when building openmsx-19.1 (exact_div, at poly-int.h:2160) Product: gcc Version: 15.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 60384 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60384&action=edit Scaler2.cc.ii.xz Originally reported downstream in Gentoo at https://bugs.gentoo.org/949343. ``` $ g++ -c Scaler2.cc.ii -std=c++20 -march=znver2 -O3 during GIMPLE pass: vect In file included from src/video/scalers/Scaler2.cc:2: src/video/scalers/LineScalers.hh: In function ‘void openmsx::Scale_1on2<Pixel>::operator()(std::span<const Pixel>, std::span<_Type, 18446744073709551615>) [with Pixel = short unsigned int]’: src/video/scalers/LineScalers.hh:458:6: internal compiler error: in exact_div, at poly-int.h:2160 0x602ba61b318a internal_error(char const*, ...) /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/diagnostic-global-context.cc:517 0x602ba61b3325 fancy_abort(char const*, int, char const*) /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/diagnostic.cc:1722 0x602ba4c62233 poly_int<1u, poly_result<unsigned long, if_nonpoly<unsigned long, unsigned long, poly_int_traits<unsigned long>::is_poly>::type, poly_coeff_pair_traits<unsigned long, if_nonpoly<unsigned long, unsigned long, poly_int_traits<unsigned long>::is_poly>::type>::result_kind>::type> exact_div<1u, unsigned long, unsigned long>(poly_int<1u, unsigned long> const&, unsigned long) [clone .isra.0] /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/poly-int.h:2160 0x602ba6d48096 poly_int<1u, poly_result<unsigned long, unsigned long, poly_coeff_pair_traits<unsigned long, unsigned long>::result_kind>::type> exact_div<1u, unsigned long, unsigned long>(poly_int<1u, unsigned long> const&, poly_int<1u, unsigned long> const&) /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/poly-int.h:2173 0x602ba6d48096 vect_get_num_vectors(poly_int<1u, unsigned long>, tree_node*) /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/tree-vectorizer.h:2119 0x602ba6d402f9 vect_compute_data_ref_alignment /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/tree-vect-data-refs.cc:1388 0x602ba6adbccd vect_analyze_data_refs_alignment(_loop_vec_info*) /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/tree-vect-data-refs.cc:2946 0x602ba6d8f3a0 vect_analyze_loop_2 /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/tree-vect-loop.cc:2960 0x602ba6d8d43c vect_analyze_loop_1 /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/tree-vect-loop.cc:3479 0x602ba6a84199 vect_analyze_loop(loop*, gimple*, vec_info_shared*) /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/tree-vect-loop.cc:3639 0x602ba6d8bdea try_vectorize_loop_1 /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/tree-vectorizer.cc:1095 0x602ba6d8bdea try_vectorize_loop /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/tree-vectorizer.cc:1212 0x602ba6a553c3 execute /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/tree-vectorizer.cc:1328 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 601d2479a8464e3bf1fb53065109a027db7c93f1' --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.1 20250204 (experimental) 4b2726a62ddfe958302d6790725503ac09b28f11 (Gentoo Hardened 15.0.9999 p, commit 601d2479a8464e3bf1fb53065109a027db7c93f1) ```