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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Barry Revzin from comment #2)
> I guess that's like:
> 
> C++11/14: neither is an aggregate (base class).
> C++17: both are aggregates.
> C++20: Bar is an aggregate, but Foo is not (user-declared constructor).
> 
> But that really shouldn't affect the code-gen here? (right???)

It changes because if the constructor is used or it is zero-initialized . And
it just happens GCC is not able to optimize it back to what the
zero-initialized can be done.

Reply via email to