On Wed, Jan 28, 2026 at 02:04:46PM +0100, Jakub Jelinek wrote: > On Wed, Jan 28, 2026 at 11:35:58AM +0800, Jason Merrill wrote: > > Can we share code with duplicate_decls? The problem you're seeing seems to > > be due to the different code paths. > > So like this?
Bootstrapped/regtested successfully on x86_64-linux and i686-linux. > 2026-01-28 Jakub Jelinek <[email protected]> > > PR c++/123825 > * cp-tree.h (merge_decl_arguments): Declare. > * decl.cc (duplicate_decls): Outline DECL_ARGUMENTS handling > into ... > (merge_decl_arguments): ... new function. > * name-lookup.cc (push_local_extern_decl_alias): Call > merge_decl_arguments. Don't copy just the first PARM_DECL when > creating a new alias FUNCTION_DECL. > > * g++.dg/reflect/has_identifier3.C: New test. > * g++.dg/reflect/identifier_of3.C: New test. > * g++.dg/cpp26/attr-indeterminate5.C: New test. Jakub
