https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121497
Bug ID: 121497 Summary: ICE at -O{2,3} on x86_64-linux-gnu: in extract_insn, at recog.cc:2884 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: --- Compiler Explorer: https://godbolt.org/z/sfjrrjfov It appears to be a recent regression as it doesn't reproduce with 15.1 and earlier. [628] % gcctk -v Using built-in specs. COLLECT_GCC=gcctk COLLECT_LTO_WRAPPER=/local/home/suz/suz-local/software/local/gcc-trunk/bin/../libexec/gcc/x86_64-pc-linux-gnu/16.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-trunk/configure --disable-bootstrap --enable-checking=yes --prefix=/local/suz-local/software/local/gcc-trunk --enable-sanitizers --enable-languages=c,c++ --disable-werror --enable-multilib Thread model: posix Supported LTO compression algorithms: zlib gcc version 16.0.0 20250810 (experimental) (GCC) [629] % [629] % gcctk -O3 -w -c small.c small.c: In function ‘main’: small.c:15:1: error: unrecognizable insn: 15 | } | ^ (insn 75 10 74 3 (set (reg:SI 125) (const_int 3000000000 [0xb2d05e00])) -1 (expr_list:REG_EQUIV (const_int 3000000000 [0xb2d05e00]) (nil))) during RTL pass: ira small.c:15:1: internal compiler error: in extract_insn, at recog.cc:2884 0x2547bc6 internal_error(char const*, ...) ../../gcc-trunk/gcc/diagnostic-global-context.cc:534 0xa05b9c fancy_abort(char const*, int, char const*) ../../gcc-trunk/gcc/diagnostics/context.cc:1687 0x891e3b _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) ../../gcc-trunk/gcc/rtl-error.cc:108 0x891e5d _fatal_insn_not_found(rtx_def const*, char const*, int, char const*) ../../gcc-trunk/gcc/rtl-error.cc:116 0x8902e7 extract_insn(rtx_insn*) ../../gcc-trunk/gcc/recog.cc:2884 0xf52343 ira_remove_insn_scratches(rtx_insn*, bool, _IO_FILE*, rtx_def* (*)(rtx_def*)) ../../gcc-trunk/gcc/ira.cc:5452 0xf54c0d remove_scratches ../../gcc-trunk/gcc/ira.cc:5496 0xf54c0d ira ../../gcc-trunk/gcc/ira.cc:5852 0xf54c0d execute ../../gcc-trunk/gcc/ira.cc:6212 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. [630] % [630] % cat small.c extern void a(int *); int q; void b(int c, int d, int e, int f, int g, int h) { int t[] = {c, d, e, f, g, h}; a(t); } int main() { int k[2], i = 0, *p(); if (q) { for (; (int)p + i < 2; i++) k[i] = -1294967296; b(k[0] + 7, k[0] + 9, k[0] + 6, k[0] + 9, k[0] + 9, k[0] + 6); } return 0; }