https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120177
Bug ID: 120177
Summary: ICE in lra_constraints, "maximum number of generated
reload insns" with inline assembly using x87
instructions (finitq, fldq, fst) — 13.3
Product: gcc
Version: 13.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: mario.rodriguezb1 at um dot es
Target Milestone: ---
The following minimal C code causes an internal compiler error (ICE) in GCC
13.3.0, during the reload phase of RTL
```
#include <stdio.h>
#include <math.h>
#include <stdio.h>
int main(int argc, char* argv[]) {
float result = 0.0;
__asm__("finitq\nfld1; fldq %1; fsqrt; fst %0"
: "=fr" (result)
: "fr" (4.0)
);
printf("float:%.9g\n", result);
}
```
```
<source>:11:1: internal compiler error: maximum number of generated reload
insns per insn achieved (90)
11 | }
| ^
0x1cfb19c internal_error(char const*, ...)
???:0
0xce4178 lra_constraints(bool)
???:0
0xcd1472 lra(_IO_FILE*)
???: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.
Compiler returned: 1
```
To reproduce:
https://gcc.godbolt.org/z/rojdr3vze