https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28831
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #28 from Jakub Jelinek <jakub at gcc dot gnu.org> --- On struct A { int i[100]; }; void f(struct A); int main() { f((struct A){1}); f((struct A){2}); f((struct A){3}); } I'm surprised that neither C nor C++ generates clobber stmts after the calls. If we managed to have clobbers for those, guess some pass early before expansion could attempt to optimize the cases where non-addressable (can we trust TREE_ADDRESSABLE at that point?) aggregate automatic vars that are only ever stored before some call after which the var is clobbered (with no other call intermixed between the stores), then we could allocate the var in the stack slot of the call. But if there are some calls in between, say to initialize some field in the aggregate, then at least for accumulate-outgoing-args we couldn't do that.