https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106303
Bug ID: 106303 Summary: ICE on valid code at -O3 with -fno-inline-small-functions on x86_64-linux-gnu: in extract_insn, at recog.cc:2791 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: zhendong.su at inf dot ethz.ch Target Milestone: --- [557] % 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 20220714 (experimental) [master r13-1696-g29f40a8047f] (GCC) [558] % [558] % gcctk -O3 -fno-inline-small-functions small.c small.c: In function âkâ: small.c:17:1: error: unrecognizable insn: 17 | } | ^ (insn 55 58 66 7 (set (reg:V1TI 90 [ D.2002 ]) (mem/c:TI (symbol_ref:DI ("j") [flags 0x2] <var_decl 0x7ff1682b7c60 j>) [2 j+0 S16 A128])) -1 (nil)) during RTL pass: subreg3 small.c:17:1: internal compiler error: in extract_insn, at recog.cc:2791 0x722c42 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) ../../gcc-trunk/gcc/rtl-error.cc:108 0x722c5e _fatal_insn_not_found(rtx_def const*, char const*, int, char const*) ../../gcc-trunk/gcc/rtl-error.cc:116 0x721191 extract_insn(rtx_insn*) ../../gcc-trunk/gcc/recog.cc:2791 0x1d4e347 decompose_multiword_subregs ../../gcc-trunk/gcc/lower-subreg.cc:1555 0x1d4f1cd 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. [559] % [559] % cat small.c struct a { int b; int c; int d; int e; } i, j; int f, g, h; struct a k() { while (f) i = j; if (g) { for (; h; h++) i = j; return j; } return i; } int main() { k(); return 0; }