https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119315
Bug ID: 119315
Summary: ICE: verify_gimple failed during IPA pass
remove_symbols with -Os
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: kristerw at gcc dot gnu.org
Target Milestone: ---
Compiling the function below for X86_64 with -Os results in an ICE:
during IPA pass: remove_symbols
bug.c:25:1: internal compiler error: verify_gimple failed
The function:
void
foo (int n)
{
struct S { int a[n]; };
struct S
fn (void)
{
struct S s;
s.a[0] = 42;
return s;
}
auto struct S
fn2 (void)
{
return fn ();
}
struct S x;
x = fn2 ();
if (x.a[0] != 42)
__builtin_abort ();
}