https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101767
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:e3e191b4104c7d6a177f66dbb77cabf05ab63781 commit r12-7740-ge3e191b4104c7d6a177f66dbb77cabf05ab63781 Author: Jason Merrill <ja...@redhat.com> Date: Fri Mar 18 14:36:19 2022 -0400 c++: designator and anon struct [PR101767] We found .x in the anonymous struct, but then didn't find .y there; we should decide that means we're done with the struct rather than that the code is wrong. PR c++/101767 gcc/cp/ChangeLog: * decl.cc (reshape_init_class): Back out of anon struct if a designator doesn't match. gcc/testsuite/ChangeLog: * g++.dg/ext/anon-struct10.C: New test.