https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128377
Bug ID: 128377
Summary: [17 Regression] ICE returns_twice call is not first in
basic block 4
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: ktkachov at gcc dot gnu.org
Target Milestone: ---
extern int rt (void) __attribute__ ((returns_twice, leaf));
extern void bar (void);
void
f (int *out, int x, int y, int c)
{
bar ();
switch (c)
{
case 1:
rt ();
out[0] = x + 1;
out[1] = y + 2;
out[2] = x + 3;
out[3] = y + 4;
break;
case 2:
bar ();
break;
}
}
on aarch64 at -O3 gives:
<source>: In function 'f':
<source>:5:1: error: returns_twice call is not first in basic block 4
5 | f (int *out, int x, int y, int c)
| ^
rt ();
during GIMPLE pass: slp
<source>:5:1: internal compiler error: verify_flow_info failed