https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94823
--- Comment #10 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:df118d7ba138cacb17203d4a1b5f27730347cc77 commit r13-1783-gdf118d7ba138cacb17203d4a1b5f27730347cc77 Author: Jason Merrill <ja...@redhat.com> Date: Wed Jul 20 18:15:31 2022 -0400 c++: defaulted ctor with DMI in union [PR94823] CWG2084 clarifies that a variant member with a non-trivial constructor does not make the union's defaulted default constructor deleted if another variant member has a default member initializer. DR 2084 PR c++/94823 gcc/cp/ChangeLog: * method.cc (walk_field_subobs): Fix DMI in union case. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/nsdmi-union7.C: New test.