https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100434
Bug ID: 100434 Summary: DSE fails to DSE aggregate LHS. Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- struct X { int x; }; extern struct X foo (void); struct X x; void bar() { x = foo(); x = (struct X){}; } the store to x from the call to foo() is not DSEd. It works for aggregate copies x = y; though.