https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122231
Bug ID: 122231
Summary: ICE: maximum number of generated reload insns per insn
achieved (90)
Product: gcc
Version: 15.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: qingren2hxb at gmail dot com
Target Milestone: ---
input:
//-O2
#include <stdint.h>
register __int128 pseudo_reg_timode __asm__("r15");
extern void abort ();
int main()
{
union {
__int128 ti;
uint64_t parts[2];
} ti_union;
pseudo_reg_timode = ti_union.ti;
if (pseudo_reg_timode != ti_union.ti) abort();
}
output:
test.c:4:19: warning: call-clobbered register used for global register variable
4 | register __int128 pseudo_reg_timode __asm__("r15");
| ^~~~~~~~~~~~~~~~~
root@acbf2d5f0f55:/testcases/x# gcc test.c -O2
test.c:4:19: warning: call-clobbered register used for global register variable
4 | register __int128 pseudo_reg_timode __asm__("r15");
| ^~~~~~~~~~~~~~~~~
during RTL pass: reload
test.c: In function 'main':
test.c:18:1: internal compiler error: maximum number of generated reload insns
per insn achieved (90)
18 | }
| ^
0x2157cc5 diagnostic_context::diagnostic_impl(rich_location*,
diagnostic_metadata const*, diagnostic_option_id, char const*, __va_list_tag
(*) [1], diagnostic_t)
???:0
0x2167ecf internal_error(char const*, ...)
???:0
0xc9f3d0 lra_constraints(bool)
???:0
0xc8b572 lra(_IO_FILE*, int)
???:0
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.
It fails with -O2, but works fine with -O0.