https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116781
Bug ID: 116781 Summary: [lra][avr] internal compiler error: in cselib_invalidate_regno, at cselib.cc:2545 Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: gjl at gcc dot gnu.org Target Milestone: --- Created attachment 59149 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59149&action=edit pr45830.c: C test case This ICE does not occur with the old reload (-mno-lra): $ avr-gcc pr45830.c -S -mlra -O2 -funroll-loops during RTL pass: postreload pr45830.c: In function 'bar': pr45830.c:79:1: internal compiler error: in cselib_invalidate_regno, at cselib.cc:2545 79 | } | ^ 0x62b4a3 cselib_invalidate_regno ../../../source/gcc-master/gcc/cselib.cc:2545 0x62b8f7 cselib_invalidate_rtx(rtx_def*) ../../../source/gcc-master/gcc/cselib.cc:2699 0x62b938 cselib_invalidate_rtx_note_stores ../../../source/gcc-master/gcc/cselib.cc:2710 0x62c87c cselib_record_sets ../../../source/gcc-master/gcc/cselib.cc:3037 0x62d00d cselib_process_insn(rtx_insn*) ../../../source/gcc-master/gcc/cselib.cc:3194 0x7f083a10ed8f __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 0x7f083a10ee3f __libc_start_main_impl ../csu/libc-start.c:392 The respective lines in cselib.cc read: cselib_invalidate_regno (unsigned int regno, machine_mode mode) { unsigned int endregno; unsigned int i; /* If we see pseudos after reload, something is _wrong_. */ gcc_assert (!reload_completed || regno < FIRST_PSEUDO_REGISTER || reg_renumber[regno] < 0); Target: avr Configured with: ../../source/gcc-master/configure --target=avr --disable-nls --with-dwarf2 --with-gnu-as --with-gnu-ld --disable-shared --enable-languages=c,c++ Thread model: single Supported LTO compression algorithms: zlib gcc version 15.0.0 20240918 (experimental) (GCC)