https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115607
Bug ID: 115607 Summary: missed tail call with large structure size Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- Target: aarch64-linux-gnu arm-linux-gnu powerpc{,64}-linux-gnu Take: ``` typedef struct Foo { int a, b, c, d, e, f, g, h; }Foo; Foo callee (int i); Foo caller (int i) { return callee (i + 1); } ``` This can be tail called but currently we don't. The issue is tail calls for functions where the structure return is passed via pointer via register is not tail called.