https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101737
pietro <pietro.gcc at sociotechnical dot xyz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pietro.gcc at sociotechnical dot x | |yz --- Comment #4 from pietro <pietro.gcc at sociotechnical dot xyz> --- Using the sh4-linux cross compiler from debian unstable: $ sh4-linux-gnu-gcc-14 -v Using built-in specs. COLLECT_GCC=sh4-linux-gnu-gcc-14 COLLECT_LTO_WRAPPER=/usr/libexec/gcc-cross/sh4-linux-gnu/14/lto-wrapper Target: sh4-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 14-20240201-3' --with-bugurl=file:///usr/share/doc/gcc-14/README.Bugs --enable-languages=c,ada,c++,fortran,objc,obj-c++,rust --prefix=/usr --with-gcc-major-version-only --program-suffix=-14 --enable-shared --enable-linker-build-id --libexecdir=/usr/libexec --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-libstdcxx-backtrace --enable-gnu-unique-object --disable-libsanitizer --disable-libquadmath --disable-libquadmath-support --enable-plugin --with-system-zlib --enable-multiarch --disable-werror --with-cpu=sh4 --with-multilib-list=m4,m4-nofpu --enable-checking=yes --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=sh4-linux-gnu --program-prefix=sh4-linux-gnu- --includedir=/usr/sh4-linux-gnu/include Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 14.0.1 20240131 (experimental) [master r14-8680-g2f14c0dbb78] (Debian 14-20240201-3) I'm able to reproduce the issue with the attached test source file: # sh4-linux-gnu-gcc-14 -c -Os test.c during RTL pass: split1 pixman-fast-path.c: In function 'fast_composite_scaled_nearest_8888_565_cover_OVER': pixman-fast-path.c:1201: internal compiler error: Segmentation fault 0xde6a7b crash_signal ../../src/gcc/toplev.cc:317 0x11ed95c sh_is_nott_insn(rtx_insn const*) ../../src/gcc/config/sh/sh.cc:11770 0x16f82df gen_split_13(rtx_insn*, rtx_def**) ../../src/gcc/config/sh/sh.md:951 0x946e5b try_split(rtx_def*, rtx_insn*, int) ../../src/gcc/emit-rtl.cc:3941 0xd3223f split_insn ../../src/gcc/recog.cc:3405 0xd37a97 split_all_insns() ../../src/gcc/recog.cc:3509 0xd37b8b execute ../../src/gcc/recog.cc:4433 But I'm not able to reproduce using the code from comment #2. I used creduce to get a simple test case: $ cat test2.c int a; void b() { int c; short *d = (short *)b; while (--c) { int e = a, f, g; while ((e -= 4) >= 0) { f += g; d++; } if (e & 2) f += g; if (e & 1) *d = f; } } $ sh4-linux-gnu-gcc-14 -c -Os test2.c during RTL pass: split1 test2.c: In function 'b': test2.c:16:1: internal compiler error: Segmentation fault 16 | } | ^ 0xde6a7b crash_signal ../../src/gcc/toplev.cc:317 0x11ed95c sh_is_nott_insn(rtx_insn const*) ../../src/gcc/config/sh/sh.cc:11770 0x16f82df gen_split_13(rtx_insn*, rtx_def**) ../../src/gcc/config/sh/sh.md:951 0x946e5b try_split(rtx_def*, rtx_insn*, int) ../../src/gcc/emit-rtl.cc:3941 0xd3223f split_insn ../../src/gcc/recog.cc:3405 0xd37a97 split_all_insns() ../../src/gcc/recog.cc:3509 0xd37b8b execute ../../src/gcc/recog.cc:4433