https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125239
Bug ID: 125239
Summary: ICE on valid code at -O{2,3} with "-fno-tree-dse
-fno-tree-dce" on x86_64-linux-gnu: in extract_insn,
at recog.cc:2894
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: zhendong.su at inf dot ethz.ch
Target Milestone: ---
Note:
- fails: trunk
- works: 16.1 and earlier
- very recent as the Compiler Explorer build doesn't ICE
[534] % 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/17.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 17.0.0 20260508 (experimental) (GCC)
[535] %
[535] % gcctk -O2 -c -fno-tree-dse -fno-tree-dce small.c
small.c: In function ‘b’:
small.c:5:1: error: unrecognizable insn:
5 | }
| ^
(insn 33 2 32 2 (set (subreg:SI (UnKnown:CC Unknown) 0)
(const_int 0 [0])) -1
(nil))
during RTL pass: ira
small.c:5:1: internal compiler error: in extract_insn, at recog.cc:2894
0x2629c0b internal_error(char const*, ...)
../../gcc-trunk/gcc/diagnostic-global-context.cc:787
0xa2a012 fancy_abort(char const*, int, char const*)
../../gcc-trunk/gcc/diagnostics/context.cc:1813
0x8ab075 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
../../gcc-trunk/gcc/rtl-error.cc:108
0x8ab097 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
../../gcc-trunk/gcc/rtl-error.cc:116
0x8a94b3 extract_insn(rtx_insn*)
../../gcc-trunk/gcc/recog.cc:2894
0xf8f044 ira_remove_insn_scratches(rtx_insn*, bool, _IO_FILE*, rtx_def*
(*)(rtx_def*))
../../gcc-trunk/gcc/ira.cc:5460
0xf9192d remove_scratches
../../gcc-trunk/gcc/ira.cc:5504
0xf9192d ira
../../gcc-trunk/gcc/ira.cc:5860
0xf9192d execute
../../gcc-trunk/gcc/ira.cc:6220
/local/home/suz/suz-local/software/local/gcc-trunk/bin/../libexec/gcc/x86_64-pc-linux-gnu/17.0.0/cc1
-quiet -I /usr/local/include -I /local/suz-local/software/local/include
-imultiarch x86_64-linux-gnu -iprefix
/local/home/suz/suz-local/software/local/gcc-trunk/bin/../lib/gcc/x86_64-pc-linux-gnu/17.0.0/
small.c -quiet -dumpbase small.c -dumpbase-ext .c -mtune=generic -march=x86-64
-O2 -fno-tree-dse -fno-tree-dce -o /tmp/ccPzFxKX.s
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.
[536] %
[536] % cat small.c
extern void a();
void b() {
int *c, *d, *e[2][20] = {{c}, {c, d, d, d, c, c, d, c}};
a();
}