[Bug c++/110197] [13 Regression] Empty constexpr object constructor erronously claims out of range access
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110197 --- Comment #11 from Matt Godbolt --- Thank you Patrick! Great news! About 1/3 of my build's output is this warning right now :)
[Bug c++/110197] [13 Regression] Empty constexpr object constructor erronously claims out of range access
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110197 Patrick Palka changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #10 from Patrick Palka --- Fixed for GCC 13.3
[Bug c++/110197] [13 Regression] Empty constexpr object constructor erronously claims out of range access
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110197 --- Comment #9 from CVS Commits --- The releases/gcc-13 branch has been updated by Patrick Palka : https://gcc.gnu.org/g:61d24d3f40638326b4a24baadeb25a88610d76d8 commit r13-7693-g61d24d3f40638326b4a24baadeb25a88610d76d8 Author: Patrick Palka Date: Thu Jul 27 09:10:07 2023 -0400 c++: constexpr empty subobject elision [PR110197] Now that init_subob_ctx no longer sets new_ctx.ctor for a subobject of empty type, it seems we need to ensure its callers also consistently omit entries in the parent ctx->ctor for such subobjects. We also need to allow cxx_eval_array_reference to synthesize an empty subobject even if the array CONSTRUCTOR has CONSTRUCTOR_NO_CLEARING set. PR c++/110197 gcc/cp/ChangeLog: * constexpr.cc (cxx_eval_array_reference): Allow synthesizing an empty subobject even if CONSTRUCTOR_NO_CLEARING is set. (cxx_eval_bare_aggregate): Set 'no_slot' to true more generally whenever new_ctx.ctor is set to NULL_TREE by init_subob_ctx, i.e. whenever initializing an subobject of empty type. (cxx_eval_vec_init_1): Define 'no_slot' as above and use it accordingly. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/constexpr-empty18.C: New test. * g++.dg/cpp0x/constexpr-empty19.C: New test. (cherry picked from commit a426b91b27e28985f47d16827a532fbc28c09bd7)
[Bug c++/110197] [13 Regression] Empty constexpr object constructor erronously claims out of range access
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110197 --- Comment #8 from Matt Godbolt --- Fantastic: thanks everyone!
[Bug c++/110197] [13 Regression] Empty constexpr object constructor erronously claims out of range access
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110197 Patrick Palka changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot gnu.org Known to work||14.0 Summary|[13/14 Regression] Empty|[13 Regression] Empty |constexpr object|constexpr object |constructor erronously |constructor erronously |claims out of range access |claims out of range access See Also||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=105795 Status|NEW |ASSIGNED --- Comment #7 from Patrick Palka --- Fixed on trunk so far.