https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94255
--- Comment #3 from Nicholas Krause <xerofoify at gmail dot com> --- I've managed to track this down to what appears to me to be a issue in: tree push_inner_scope (tree inner) { tree outer = current_scope (); if (!outer) outer = current_namespace; push_inner_scope_r (outer, inner); return outer; } I'm not certain if we should just check against NULL_TREE for outer or do we need to also check against DECL_NAMESPACE as well. CCing Jason Merrill to take a look at this with his comments.