[Bug rtl-optimization/105192] New: ICE: in gen_reg_rtx, at emit-rtl.cc:1167 (during RTL pass: ce3) with -O -fno-if-conversion -fharden-compares
zsojka at seznam dot cz
gcc-bugzilla@gcc.gnu.org
Thu Apr 7 07:02:49 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105192
Bug ID: 105192
Summary: ICE: in gen_reg_rtx, at emit-rtl.cc:1167 (during RTL
pass: ce3) with -O -fno-if-conversion
-fharden-compares
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: zsojka at seznam dot cz
Target Milestone: ---
Host: x86_64-pc-linux-gnu
Target: mips64el-unknown-linux-gnuabi64
Created attachment 52764
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52764&action=edit
reduced testcase
Maybe related to PR102478
Compiler output:
$ mips64el-unknown-linux-gnuabi64-gcc -O -fno-if-conversion -fharden-compares
testcase.c
testcase.c: In function 'foo':
testcase.c:6:9: warning: division by zero [-Wdiv-by-zero]
6 | b = a % 0 > 0;
| ^
during RTL pass: ce3
testcase.c:7:1: internal compiler error: in gen_reg_rtx, at emit-rtl.cc:1167
7 | }
| ^
0x617bec gen_reg_rtx(machine_mode)
/repo/gcc-trunk/gcc/emit-rtl.cc:1167
0xb25149 force_reg(machine_mode, rtx_def*)
/repo/gcc-trunk/gcc/explow.cc:677
0x12ac906 mips_expand_conditional_trap(rtx_def*)
/repo/gcc-trunk/gcc/config/mips/mips.cc:5815
0x16934d6 gen_ctrapsi4(rtx_def*, rtx_def*, rtx_def*, rtx_def*)
/repo/gcc-trunk/gcc/config/mips/mips.md:1222
0xde84b9 rtx_insn* insn_gen_fn::operator()<rtx_def*, rtx_def*, rtx_def*,
rtx_def*>(rtx_def*, rtx_def*, rtx_def*, rtx_def*) const
/repo/gcc-trunk/gcc/recog.h:407
0xde84b9 gen_cond_trap(rtx_code, rtx_def*, rtx_def*, rtx_def*)
/repo/gcc-trunk/gcc/optabs.cc:5938
0x182645c find_cond_trap
/repo/gcc-trunk/gcc/ifcvt.cc:5076
0x182645c find_if_header
/repo/gcc-trunk/gcc/ifcvt.cc:4701
0x182645c if_convert
/repo/gcc-trunk/gcc/ifcvt.cc:5838
0x182724d execute
/repo/gcc-trunk/gcc/ifcvt.cc:5991
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
$ mips64el-unknown-linux-gnuabi64-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-mips64el/bin/mips64el-unknown-linux-gnuabi64-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r12-8030-20220406184252-g61bee6aed26-checking-yes-rtl-df-extra-mips64el/bin/../libexec/gcc/mips64el-unknown-linux-gnuabi64/12.0.1/lto-wrapper
Target: mips64el-unknown-linux-gnuabi64
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--with-cloog --with-ppl --with-isl
--with-sysroot=/usr/mips64el-unknown-linux-gnuabi64 --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=mips64el-unknown-linux-gnuabi64
--with-ld=/usr/bin/mips64el-unknown-linux-gnuabi64-ld
--with-as=/usr/bin/mips64el-unknown-linux-gnuabi64-as --disable-multilib
--with-abi=64 --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r12-8030-20220406184252-g61bee6aed26-checking-yes-rtl-df-extra-mips64el
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.1 20220406 (experimental) (GCC)
More information about the Gcc-bugs
mailing list