https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106151

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #4)
> Ideally the middle end should optimize it. But until then, I wonder if the
> front end could detect when a non-trivial ctor is just doing zero-init of
> every member, and fold it early.

The front-end suggestion is what is done in GCC 15+.

Reply via email to