https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117037
--- Comment #4 from fujin zhao <bigmagicreadsun at gmail dot com> --- After adding the -freport-bug compilation option, the error message is as follows: [ 49%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/layers/reduce_layer.cpp.o during GIMPLE pass: vect opencv/modules/dnn/src/layers/reduce_layer.cpp: In member function 'void cv::dnn::ReduceLayerImpl::ReduceAllInvoker<Op>::operator()(const cv::Range&) const [with Op = cv::dnn::ReduceLayerImpl::ReduceProd<signed char>]': opencv/modules/dnn/src/layers/reduce_layer.cpp:290:14: internal compiler error: in vect_create_partial_epilog, at tree-vect-loop.cc:5866 290 | void operator()(const Range& r) const CV_OVERRIDE { | ^~~~~~~~ 0x7fddb57b7082 __libc_start_main ../csu/libc-start.c:308 Please submit a full bug report, with preprocessed source. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. The bug is not reproducible, so it is likely a hardware or OS problem. make[2]: *** [modules/dnn/CMakeFiles/opencv_dnn.dir/build.make:1181: modules/dnn/CMakeFiles/opencv_dnn.dir/src/layers/reduce_layer.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:2564: modules/dnn/CMakeFiles/opencv_dnn.dir/all] Error 2 make: *** [Makefile:163: all] Error 2 The current version information of g++: riscv64-unknown-linux-gnu-g++ -v Using built-in specs. COLLECT_GCC=riscv64-unknown-linux-gnu-g++ COLLECT_LTO_WRAPPER=/2024-gcc14/gcc/bin/../libexec/gcc/riscv64-unknown-linux-gnu/14.2.1/lto-wrapper Target: riscv64-unknown-linux-gnu Configured with: /builds/software/devtools/riscv-gnu-toolchain/gcc/configure --target=riscv64-unknown-linux-gnu --prefix=/work/toolchain/install/linux64/glibc/2024-gcc14/gcc --with-sysroot=/work/toolchain/install/linux64/glibc/2024-gcc14/gcc/sysroot --with-pkgversion=gd92407a96 --with-system-zlib --enable-shared --enable-tls --enable-languages=c,c++,fortran --disable-libmudflap --disable-libssp --disable-libquadmath --disable-libsanitizer --disable-nls --disable-bootstrap --src=/builds/software/devtools/riscv-gnu-toolchain/gcc --enable-multilib --with-abi=lp64 --with-arch=rv64ima --with-tune=rocket --with-isa-spec=2.2 'CFLAGS_FOR_TARGET=-O2 -mcmodel=medany' 'CXXFLAGS_FOR_TARGET=-O2 -mcmodel=medany' Thread model: posix Supported LTO compression algorithms: zlib gcc version 14.2.1 20240816 (gd92407a96)