https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91476
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:25d62480c89d6db90a66ba69f6dbaa820a1ac90b commit r10-6307-g25d62480c89d6db90a66ba69f6dbaa820a1ac90b Author: Jason Merrill <ja...@redhat.com> Date: Tue Jan 28 15:15:20 2020 -0500 c++: Fix guard variable and attribute weak. My patch for PR 91476 worked for decls that are implicitly comdat/weak due to C++ linkage rules, but broke variables explicitly marked weak. PR c++/93477 PR c++/91476 * decl2.c (copy_linkage): Do copy DECL_ONE_ONLY and DECL_WEAK.