https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118440
--- Comment #6 from Disservin <disservin.social at gmail dot com> --- (In reply to Andrew Pinski from comment #3) > Note this is NOT wrong code to store a zero there since you are storing from > an uninitialized value. yes, maybe it was poorly described in my initial report.. this was purely an optimization bug report, in our use case we initialized the struct at a later point and saw that gcc default inits it which seemed a bit useless auto [s] = foo0(); s.ii = 2; tbh I think we only tested this in our godbolt repoducer, not sure if the zero init was actually in our programs generated assembly because of inlining and other optimizations