https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90479
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-9 branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:e153e0ef3a35c2c72e8bf89bd905fe27f8877852 commit r9-8622-ge153e0ef3a35c2c72e8bf89bd905fe27f8877852 Author: Jason Merrill <ja...@redhat.com> Date: Mon May 25 18:38:09 2020 -0400 c++: Local class DMI using local static [PR90479] For default member initializers in templates it's important to push into the right context during get_nsdmi. But for a local class that's not possible, and trying leaves the function context we need to be in, so don't try. gcc/cp/ChangeLog 2020-05-01 Jason Merrill <ja...@redhat.com> PR c++/90479 * init.c (get_nsdmi): Don't push_to_top_level for a local class.