https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42909
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Created attachment 61618 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61618&action=edit Patch which I am testing for the aarch64 issue This also improves: ``` struct s1 { int x[1024]; }; struct s1 gs1; extern void g1(struct s1); void g_f1() { g1(gs1); } void l_f1() { struct s1 ls1 = {0, 1,2,3}; g1(ls1); } void f1(struct s1 s1) { g1(s1); } ``` l_f1 here as there is no need for an extra copy since there is no use of ls1 after the call so g1 can "own" the local version.