Tested on Linux-PPC64. Comments very much welcomed on the change to g++.old-deja/g++.pt/crash3.C, I'm not at all sure what that test is trying to do; it looks like it may have never cared about the names of the local functions, but rather about the fact that the function bodies of the member functions of the class template are not instantiated just because the member functions return types that are specializations of the class template.
/cp PR c++/69855. name-lookup.c (pushdecl_maybe_friend_1): Push local function decls into the global scope after stripping template bits and setting DECL_ANTICIPATED. /testsuite PR c++/69855. g++.dg/overload/69855.C: New. g++.old-deja/g++.law/missed-error2.C: Adjust. g++.old-deja/g++.pt/crash3.C: Likewise.
69855.diff4
Description: Binary data