https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116437
Bug ID: 116437 Summary: [15 Regression] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1934 with -O2 -march=emeraldrapids -fno-split-wide-types -m32 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: zsojka at seznam dot cz Target Milestone: --- Host: x86_64-pc-linux-gnu Target: x86_64-pc-linux-gnu Created attachment 58966 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58966&action=edit reduced testcase Compiler output: $ x86_64-pc-linux-gnu-gcc -O2 -march=emeraldrapids -fno-split-wide-types -m32 testcase.c during RTL pass: ext_dce testcase.c: In function 'foo': testcase.c:16:1: internal compiler error: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1934 16 | } | ^ 0x2b5bf5e internal_error(char const*, ...) /repo/gcc-trunk/gcc/diagnostic-global-context.cc:491 0x821738 rtl_check_failed_code1(rtx_def const*, rtx_code, char const*, int, char const*) /repo/gcc-trunk/gcc/rtl.cc:770 0xe051c6 rhs_regno(rtx_def const*) /repo/gcc-trunk/gcc/rtl.h:1934 0xe054de rhs_regno(rtx_def const*) /repo/gcc-trunk/gcc/ext-dce.cc:405 0xe054de ext_dce_try_optimize_insn /repo/gcc-trunk/gcc/ext-dce.cc:426 0xe054de ext_dce_process_uses /repo/gcc-trunk/gcc/ext-dce.cc:679 0x28cce0f ext_dce_process_bb /repo/gcc-trunk/gcc/ext-dce.cc:887 0x28cce0f ext_dce_rd_transfer_n /repo/gcc-trunk/gcc/ext-dce.cc:1029 0x106bf8b df_worklist_propagate_backward /repo/gcc-trunk/gcc/df-core.cc:970 0x106bf8b df_worklist_dataflow_doublequeue /repo/gcc-trunk/gcc/df-core.cc:1054 0x106bf8b df_worklist_dataflow(dataflow*, bitmap_head*, int*, int) /repo/gcc-trunk/gcc/df-core.cc:1132 0x28cd2f7 ext_dce_execute() /repo/gcc-trunk/gcc/ext-dce.cc:1058 0x28cd658 execute /repo/gcc-trunk/gcc/ext-dce.cc:1098 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-3013-20240819104043-g8d6c6fbc527-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-3013-20240819104043-g8d6c6fbc527-checking-yes-rtl-df-extra-nobootstrap-amd64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 15.0.0 20240819 (experimental) (GCC)