https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127483
Bug ID: 127483
Summary: [17 Regression] ICE: in gen_lowpart_general, at
rtlhooks.cc:63 with -Og -g
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: zsojka at seznam dot cz
Target Milestone: ---
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Created attachment 65632
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65632&action=edit
reduced testcase
Compiler output:
$ x86_64-pc-linux-gnu-gcc -Og -g testcase.c
during RTL pass: jump
testcase.c: In function 'foo':
testcase.c:12:1: internal compiler error: in gen_lowpart_general, at
rtlhooks.cc:63
12 | }
| ^
0x2c5bd5d internal_error(char const*, ...)
/repo/gcc-trunk/gcc/diagnostic-global-context.cc:787
0xcb3a85 fancy_abort(char const*, int, char const*)
/repo/gcc-trunk/gcc/diagnostics/context.cc:1813
0x8af6cd gen_lowpart_general(machine_mode, rtx_def*)
/repo/gcc-trunk/gcc/rtlhooks.cc:63
0x149ed03 simplify_context::simplify_binary_operation_1(rtx_code, machine_mode,
rtx_def*, rtx_def*, rtx_def*, rtx_def*)
/repo/gcc-trunk/gcc/simplify-rtx.cc:5626
0x14a6f2e simplify_context::simplify_binary_operation(rtx_code, machine_mode,
rtx_def*, rtx_def*)
/repo/gcc-trunk/gcc/simplify-rtx.cc:2881
0x14a6faa simplify_context::simplify_gen_binary(rtx_code, machine_mode,
rtx_def*, rtx_def*)
/repo/gcc-trunk/gcc/simplify-rtx.cc:182
0x14b969e simplify_gen_binary(rtx_code, machine_mode, rtx_def*, rtx_def*)
/repo/gcc-trunk/gcc/rtl.h:3608
0x14b969e simplify_replace_fn_rtx(rtx_def*, rtx_def const*, rtx_def*
(*)(rtx_def*, rtx_def const*, void*), void*)
/repo/gcc-trunk/gcc/simplify-rtx.cc:442
0x29aab19 delete_trivially_dead_insns(rtx_insn*, int)
/repo/gcc-trunk/gcc/cse.cc:7486
0x2969d66 execute
/repo/gcc-trunk/gcc/cfgcleanup.cc:3238
/repo/gcc-trunk/binary-trunk-20260918150049-r17-4418-gdb655b1fdce54a-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/17.0.0/cc1
-quiet -iprefix
/repo/gcc-trunk/binary-trunk-20260918150049-r17-4418-gdb655b1fdce54a-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../lib/gcc/x86_64-pc-linux-gnu/17.0.0/
testcase.c -quiet -dumpdir a- -dumpbase testcase.c -dumpbase-ext .c
-mtune=generic -march=x86-64 -g -Og -o /tmp/cc1NyEjy.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.
$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-20260918150049-r17-4418-gdb655b1fdce54a-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/17.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-bootstrap --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --enable-libsanitizer
--disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-20260918150049-r17-4418-gdb655b1fdce54a-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 17.0.0 20260918 (experimental) (GCC)