https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104820
Bug ID: 104820
Summary: mips: ICE in int_mode_for_mode, at stor-layout.cc:407
with -fzero-call-used-regs=all -mips4
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: xry111 at mengyan1223 dot wang
Target Milestone: ---
May be related to PR104817, but the stack backtrace is different:
echo 'int t() {}' | /home/xry111/git-repos/gcc-test-mips/gcc/cc1 -nostdinc
-fzero-call-used-regs=all -mips4
t
Analyzing compilation unit
Performing interprocedural optimizations
<*free_lang_data> {heap 1208k} <visibility> {heap 1208k} <build_ssa_passes>
{heap 1208k} <opt_local_passes> {heap 1208k} <remove_symbols> {heap 1208k}
<targetclone> {heap 1208k} <free-fnsummary> {heap 1208k} <emutls> {heap
1208k}Streaming LTO
<whole-program> {heap 1208k} <fnsummary> {heap 1208k} <inline> {heap 1208k}
<modref> {heap 1208k} <free-fnsummary> {heap 1208k} <single-use> {heap
1208k}Assembling functions:
tduring RTL pass: zero_call_used_regs
<stdin>: In function âtâ:
<stdin>:1:10: internal compiler error: in int_mode_for_mode, at
stor-layout.cc:407
0x13498b9 int_mode_for_mode(machine_mode)
../../gcc/gcc/stor-layout.cc:407
0xdf06ea emit_move_via_integer
../../gcc/gcc/expr.cc:3615
0xdf10ea emit_move_ccmode
../../gcc/gcc/expr.cc:3834
0xdf17ff emit_move_insn_1(rtx_def*, rtx_def*)
../../gcc/gcc/expr.cc:3974
0xdf21ab emit_move_insn(rtx_def*, rtx_def*)
../../gcc/gcc/expr.cc:4125
0x135d39b default_zero_call_used_regs(HARD_REG_SET)
../../gcc/gcc/targhooks.cc:1040
0xe98230 gen_call_used_regs_seq
../../gcc/gcc/function.cc:5927
0xe99800 execute
../../gcc/gcc/function.cc:6697
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.