https://gcc.gnu.org/bugzilla/show_bug.cgi?id=129259
Bug ID: 129259
Summary: ICE: in rtl_verify_bb_insns, at cfgrtl.cc:3011,
reg-stack emits x87 pop after asm goto jump_insn.
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: jiangchangwu at smail dot nju.edu.cn
Target Milestone: ---
Compiler Explorer: https://godbolt.org/z/5os1M8c9v
*******************************************************************************
Program:
$ cat case.c
#include <stdio.h>
__attribute__((noipa))
long double f(long double a, int m) {
asm goto("testl %[m], %[m]\n\t"
"jne %l[L]"
:
: "f"(a), [m] "r"(m)
: "cc"
: L);
return 1.0L;
L:
return 777.0L;
}
int main(void) {
long double s = 0;
for (int i = 0; i < 20; i++)
s += f(2.0L, 1);
printf("%Lf\n", s);
return 0;
}
*******************************************************************************
Tested on GCC 17.0.0 20261130 (0beb11c5cd142242fba819b09808fd86141a60f8)
$ gcc -c case.c:
error: flow control insn inside a basic block
during RTL pass: stack
internal compiler error: in rtl_verify_bb_insns, at cfgrtl.cc:3011
Tested on GCC 16.2
$ gcc -c case.c:
Compiler returned: 0