https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117164
--- Comment #5 from Joseph S. Myers <jsm28 at gcc dot gnu.org> --- Slightly simplified test (note that only one nested function is needed, and none of the calls to it actually use the return value - but all three calls are needed to get the ICE). The special options from nested-func-12.c are still needed, and I haven't yet figured out what is making the remapping of types in inlining happen in such a way that an invalid conversion results. void foo (int n) { struct S { int a[n]; }; struct S fn (void) { struct S s; s.a[0] = 42; return s; } fn (); fn (); fn (); } int main (void) { foo (1); }