https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100489
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:a335afe208cd27cf8ee4cb028fb7769700ab6245 commit r10-9857-ga335afe208cd27cf8ee4cb028fb7769700ab6245 Author: Jason Merrill <ja...@redhat.com> Date: Wed May 19 21:12:45 2021 -0400 c++: designated init with anonymous union [PR100489] My patch for PR98463 added an assert that tripped on this testcase, because we ended up with a U CONSTRUCTOR with an initializer for a, which is not a member of U. We need to wrap the a initializer in another CONSTRUCTOR for the anonymous union. For the GCC 10 branch, just remove the assert. PR c++/100489 gcc/cp/ChangeLog: * constexpr.c (get_or_insert_ctor_field): Remove assert. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/desig18.C: New test.