[Bug c++/90383] [9/10 Regression] GCC generates invalid constexpr copy/move assignment operators for types with trailing padding. (Again)

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu May 9 09:02:00 GMT 2019


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 46321
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46321&action=edit
gcc10-pr90383.patch

And the bug is that when copy_fn makes a copy of the function for constexpr
evaluation purposes, the inliner helper functions actually fold some
expressions in it, which confuses the constexpr inline evaluation.
This untested patch prevents that folding, which we really need just when
actually inlining or performing other middle-end optimizations.


More information about the Gcc-bugs mailing list