https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118510
Bug ID: 118510 Summary: [15 Regression][x86] ICE in extract_insn, at recog.cc:2869 with -mapxf since r15-5635-g1ff69000b50e8a Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: mjires at gcc dot gnu.org CC: ubizjak at gmail dot com Target Milestone: --- Target: x86_64 Compiling reduced testcase gcc.dg/ipa/20040703-wpa.c results in ICE since r15-5635-g1ff69000b50e8a. $ cat 20040703-wpa.c typedef struct cpp_num cpp_num; struct cpp_num { int high; unsigned low; int overflow; }; int num_rshift_n; cpp_num num_lshift(cpp_num num) { num.low = num.low >> num_rshift_n | num.high << (32 - num_rshift_n); return num; } $ gcc 20040703-wpa.c -mapxf -O2 20040703-wpa.c: In function ‘num_lshift’: 20040703-wpa.c:11:1: error: unrecognizable insn: 11 | } | ^ (insn 39 38 16 2 (parallel [ (set (reg:SI 124) (ior:SI (lshiftrt:SI (reg:SI 120) (and:QI (subreg:QI (reg:SI 98 [ num_rshift_n.0_1 ]) 0) (const_int 31 [0x1f]))) (subreg:SI (ashift:DI (zero_extend:DI (subreg:SI (reg:DI 122 [ num ]) 0)) (minus:QI (const_int 32 [0x20]) (and:QI (subreg:QI (reg:SI 98 [ num_rshift_n.0_1 ]) 0) (const_int 31 [0x1f])))) 0))) (clobber (reg:CC 17 flags)) (set (mem/c:SI (plus:DI (reg/f:DI 19 frame) (const_int -28 [0xffffffffffffffe4])) [1 num.low+0 S4 A32]) (reg:SI 124)) ]) "20040703-wpa.c":9:37 -1 (nil)) during RTL pass: subreg3 20040703-wpa.c:11:1: internal compiler error: in extract_insn, at recog.cc:2882 0x370010f internal_error(char const*, ...) /home/mjires/git/GCC/master/gcc/diagnostic-global-context.cc:517 0x36cfabb fancy_abort(char const*, int, char const*) /home/mjires/git/GCC/master/gcc/diagnostic.cc:1722 0x17e96a0 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) /home/mjires/git/GCC/master/gcc/rtl-error.cc:108 0x17e96e1 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*) /home/mjires/git/GCC/master/gcc/rtl-error.cc:116 0x1792f12 extract_insn(rtx_insn*) /home/mjires/git/GCC/master/gcc/recog.cc:2882 0x34fe2be decompose_multiword_subregs /home/mjires/git/GCC/master/gcc/lower-subreg.cc:1587 0x34fec65 execute /home/mjires/git/GCC/master/gcc/lower-subreg.cc:1894 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. $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/x86_64-pc-linux-gnu/15.0.1/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /home/mjires/git/GCC/master/configure --prefix=/home/mjires/built/master --disable-bootstrap --enable-languages=c,c++,fortran,lto --disable-multilib --disable-libsanitizer --enable-checking Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 15.0.1 20250116 (experimental) (GCC)