On Wed, Jan 26, 2022 at 06:16:34PM -0500, Jason Merrill via Gcc-patches wrote: > The problem with this testcase was that since my patch for PR97900 we > weren't preserving DECL_UID identity for parameters of instantiations of > templated functions, so using those parameters as the keys for the > defarg_inst map broke. I think this was always fragile given the > possibility of redeclarations, so instead of reverting that change let's > switch to keying off the function. > > Memory use compiling stdc++.h is not noticeably different. > > Tested x86_64-pc-linux-gnu. Is the tree.{h,cc} change, just moving the class > definition from one to the other, OK for trunk?
Ok. > PR c++/103186 > > gcc/ChangeLog: > > * tree.h (struct tree_vec_map_cache_hasher): Move from... > * tree.cc (struct tree_vec_map_cache_hasher): ...here. > > gcc/cp/ChangeLog: > > * pt.cc (defarg_inst): Use tree_vec_map_cache_hasher. > (defarg_inst_for): New. > (tsubst_default_argument): Adjust. > > gcc/testsuite/ChangeLog: > > * g++.dg/cpp0x/lambda/lambda-defarg10.C: New test. Jakub