https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113385
Bug ID: 113385 Summary: [14 regression] ICE when building opencv (dfs_enumerate_from, at cfganal.cc:1590) Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: sjames at gcc dot gnu.org CC: tnfchris at gcc dot gnu.org Target Milestone: --- Created attachment 57077 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57077&action=edit essential_solver.cpp.ii (Note that this is with https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113364#c9 applied so I could bootstrap.) ``` $ g++ -c essential_solver.cpp.ii -march=znver2 -O3 -std=c++14 during GIMPLE pass: vect In file included from /usr/include/eigen3/Eigen/Householder:23, from /usr/include/eigen3/Eigen/QR:15, from /usr/include/eigen3/Eigen/Dense:4, from /usr/include/eigen3/Eigen/Eigen:1, from /var/tmp/portage/media-libs/opencv-4.8.1-r1/work/opencv-4.8.1/modules/calib3d/src/usac/essential_solver.cpp:8: /usr/include/eigen3/Eigen/src/Householder/Householder.h: In member function ‘void Eigen::MatrixBase<Derived>::applyHouseholderOnTheRight(const EssentialPart&, const Scalar&, Scalar*) [with EssentialPart = Eigen::Matrix<double, 2, 1>; Derived = Eigen::Block<Eigen::Matrix<double, 10, 10>, -1, -1, false>]’: /usr/include/eigen3/Eigen/src/Householder/Householder.h:154:6: internal compiler error: in dfs_enumerate_from, at cfganal.cc:1590 154 | void MatrixBase<Derived>::applyHouseholderOnTheRight( | ^~~~~~~~~~~~~~~~~~~ 0x56284e95dedb dfs_enumerate_from(basic_block_def*, int, bool (*)(basic_block_def const*, void const*), basic_block_def**, int, void const*) /usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/cfganal.cc:1590 0x562850340e8b get_loop_body_with_size(loop const*, basic_block_def**, unsigned int) /usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/cfgloop.cc:872 0x562850340e8b get_loop_body(loop const*) /usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/cfgloop.cc:901 0x56285033ca5c estimate_numbers_of_iterations(loop*) /usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/tree-ssa-loop-niter.cc:4833 0x5628508c5072 loop_exits_before_overflow /usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/tree-ssa-loop-niter.cc:5259 0x5628504227b2 scev_probably_wraps_p(tree_node*, tree_node*, tree_node*, gimple*, loop*, bool) /usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/tree-ssa-loop-niter.cc:5511 0x5628503d64cd convert_affine_scev(loop*, tree_node*, tree_node**, tree_node**, gimple*, bool, tree_node*) /usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/tree-chrec.cc:1425 0x562850354ba7 chrec_convert_1 /usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/tree-chrec.cc:1483 0x562850350aea interpret_gimple_assign /usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/tree-scalar-evolution.cc:1919 0x562850350aea analyze_scalar_evolution_1 /usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/tree-scalar-evolution.cc:1970 0x562850344f7d analyze_scalar_evolution(loop*, tree_node*) /usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/tree-scalar-evolution.cc:2039 0x562850343721 analyze_scalar_evolution_in_loop /usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/tree-scalar-evolution.cc:2165 0x562850343721 simple_iv_with_niters(loop*, loop*, tree_node*, affine_iv*, tree_node**, bool) /usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/tree-scalar-evolution.cc:3237 0x562850904a0f get_cst_init_from_scev /usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/tree-ssa-loop-niter.cc:4015 0x5628508ab276 record_nonwrapping_iv(loop*, tree_node*, tree_node*, gimple*, tree_node*, tree_node*, bool, bool) [clone .constprop.0] /usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/tree-ssa-loop-niter.cc:4101 0x56285033d648 infer_loop_bounds_from_signedness /usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/tree-ssa-loop-niter.cc:4380 0x56285033d648 infer_loop_bounds_from_undefined /usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/tree-ssa-loop-niter.cc:4418 0x56285033d648 estimate_numbers_of_iterations(loop*) /usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/tree-ssa-loop-niter.cc:4872 0x56285066ec47 estimated_loop_iterations(loop*, generic_wide_int<widest_int_storage<131072> >*) /usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/tree-ssa-loop-niter.cc:4904 0x56285066ebe1 estimated_loop_iterations_int(loop*) /usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/tree-ssa-loop-niter.cc:4919 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=g++ COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/14/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-14.0.1.9999/work/gcc-14.0.1.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/14 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/14/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14 --disable-silent-rules --disable-dependency-tracking --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/14/python --enable-languages=c,c++,fortran --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 14.0.1 p, commit 9d69e54a3b402b0fad067464bd402e92c14504a9' --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-libgomp --disable-libssp --disable-libada --disable-cet --disable-systemtap --disable-valgrind-annotations --disable-vtable-verify --disable-libvtv --with-zstd --without-isl --enable-default-pie --enable-host-pie --disable-host-bind-now --enable-default-ssp --with-build-config='bootstrap-O3 bootstrap-lto' Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 14.0.1 20240113 (experimental) 9935667a69896865b848dfa690f94c9c693a48a3 (Gentoo 14.0.1 p, commit 9d69e54a3b402b0fad067464bd402e92c14504a9) ```