https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115384
Bug ID: 115384 Summary: [15 Regression] ICE: RTL check: expected code 'const_int', have 'const_wide_int' in simplify_binary_operation_1, at simplify-rtx.cc:4088 Product: gcc Version: 14.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 58379 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58379&action=edit reduced testcase This might need RTL checking enabled. Compiler output: $ x86_64-pc-linux-gnu-gcc -O testcase.c during RTL pass: dse1 testcase.c: In function 'foo': testcase.c:9:1: internal compiler error: RTL check: expected code 'const_int', have 'const_wide_int' in simplify_binary_operation_1, at simplify-rtx.cc:4088 9 | } | ^ 0x8132d6 rtl_check_failed_code1(rtx_def const*, rtx_code, char const*, int, char const*) /repo/gcc-trunk/gcc/rtl.cc:770 0x824c92 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:4088 0x14fb9ad simplify_context::simplify_binary_operation(rtx_code, machine_mode, rtx_def*, rtx_def*) /repo/gcc-trunk/gcc/simplify-rtx.cc:2682 0x14fc6fc simplify_binary_operation(rtx_code, machine_mode, rtx_def*, rtx_def*) /repo/gcc-trunk/gcc/rtl.h:3493 0x14fc6fc simplify_rtx(rtx_def const*) /repo/gcc-trunk/gcc/simplify-rtx.cc:8111 0xff4a2f cselib_expand_value_rtx_1 /repo/gcc-trunk/gcc/cselib.cc:2128 0xff4044 expand_loc /repo/gcc-trunk/gcc/cselib.cc:1756 0xff48d4 cselib_expand_value_rtx_1 /repo/gcc-trunk/gcc/cselib.cc:1919 0xff5c86 cselib_expand_value_rtx(rtx_def*, bitmap_head*, int) /repo/gcc-trunk/gcc/cselib.cc:1816 0x276ffe0 record_store /repo/gcc-trunk/gcc/dse.cc:1511 0x277266b scan_insn /repo/gcc-trunk/gcc/dse.cc:2691 0x277266b dse_step1 /repo/gcc-trunk/gcc/dse.cc:2808 0x277266b rest_of_handle_dse /repo/gcc-trunk/gcc/dse.cc:3725 0x277266b execute /repo/gcc-trunk/gcc/dse.cc:3798 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-r15-1093-20240607103208-ga47b1aaa7a7-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/15.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 --with-cloog --with-ppl --with-isl --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-r15-1093-20240607103208-ga47b1aaa7a7-checking-yes-rtl-df-extra-nobootstrap-amd64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 15.0.0 20240607 (experimental) (GCC)