https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106303
--- Comment #4 from Zhendong Su <zhendong.su at inf dot ethz.ch> --- Here is another repro that ICEs at -O2 (without -fno-inline-small-functions). [570] % gcctk -v Using built-in specs. COLLECT_GCC=gcctk COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/13.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-trunk/configure --disable-bootstrap --prefix=/local/suz-local/software/local/gcc-trunk --enable-sanitizers --enable-languages=c,c++ --disable-werror --enable-multilib --with-system-zlib Thread model: posix Supported LTO compression algorithms: zlib gcc version 13.0.0 20220717 (experimental) [master r13-1722-g7bcd7f47359] (GCC) [571] % [571] % gcctk -O2 small.c small.c: In function ānā: small.c:18:1: error: unrecognizable insn: 18 | } | ^ (insn 41 25 32 8 (set (reg:TI 85 [ D.2008 ]) (reg:V1TI 90 [ D.2008 ])) "small.c":16:12 -1 (expr_list:REG_DEAD (reg:V1TI 90 [ D.2008 ]) (expr_list:REG_EQUAL (mem/c:TI (symbol_ref:DI ("k") [flags 0x2] <var_decl 0x7f279eb4acf0 k>) [2 k+0 S16 A128]) (nil)))) during RTL pass: subreg3 small.c:18:1: internal compiler error: in extract_insn, at recog.cc:2791 0x722ccc _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) ../../gcc-trunk/gcc/rtl-error.cc:108 0x722ce8 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*) ../../gcc-trunk/gcc/rtl-error.cc:116 0x72121b extract_insn(rtx_insn*) ../../gcc-trunk/gcc/recog.cc:2791 0x1d4e697 decompose_multiword_subregs ../../gcc-trunk/gcc/lower-subreg.cc:1555 0x1d4f51d execute ../../gcc-trunk/gcc/lower-subreg.cc:1820 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. [572] % [572] % cat small.c struct a { int b; int c; int d; int e; } i, j, k, l; int f, g, h; static struct a n() { if (f) while (1) i = k; j = k; for (; g; g++) ; if (h) return k; return j; } void o() { l = n(); } int main() { o(); return 0; }