https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106030
Bug ID: 106030 Summary: ice in emit_move_insn, at expr.cc:4026 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: dcb314 at hotmail dot com Target Milestone: --- For this C code: int safe_mul_func_int8_t_s_s_si2, g_7014, g_11941_l_12290; char(safe_mul_func_uint8_t_u_u)(ui1, ui2) { return ui1 * ui2; } void g_11941() { char __trans_tmp_1 = (safe_mul_func_uint8_t_u_u <= g_7014) * safe_mul_func_int8_t_s_s_si2; g_11941_l_12290 = safe_mul_func_uint8_t_u_u(2 != g_11941, __trans_tmp_1); } can be compiled like this: $ /home/dcb/gcc/results/bin/gcc -v Using built-in specs. COLLECT_GCC=/home/dcb/gcc/results/bin/gcc COLLECT_LTO_WRAPPER=/home/dcb/gcc/results.20220617/libexec/gcc/arm-linux-gnueabihf/13.0.0/lto-wrapper Target: arm-linux-gnueabihf Configured with: ../trunk/configure --prefix=/home/dcb/gcc/results.20220617 --disable-bootstrap --disable-multilib --disable-werror --with-pkgversion=1d6044c250e3badf --enable-checking=yes --enable-languages=c,c++ --with-cpu=cortex-a72 --with-fpu=neon-fp-armv8 --with-float=hard --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf Thread model: posix Supported LTO compression algorithms: zlib gcc version 13.0.0 20220617 (experimental) (1d6044c250e3badf) $ /home/dcb/gcc/results/bin/gcc -c -w q.i $ but switch on -O1 and this happens: $ /home/dcb/gcc/results/bin/gcc -c -w -O1 q.i during RTL pass: expand q.i: In function 'g_11941': q.i:6:19: internal compiler error: in emit_move_insn, at expr.cc:4026 6 | g_11941_l_12290 = safe_mul_func_uint8_t_u_u(2 != g_11941, __trans_tmp_ 1); | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~ 0x551897 emit_move_insn(rtx_def*, rtx_def*) /home/dcb/gcc/working/gcc/../../trunk/gcc/expr.cc:4025 0x54608f expand_and(machine_mode, rtx_def*, rtx_def*, rtx_def*) /home/dcb/gcc/working/gcc/../../trunk/gcc/expmed.cc:5482