https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61659

--- Comment #27 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Possible fix:

diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index d03f8a4707e5..d8fb35e21237 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -2215,7 +2215,7 @@ duplicate_decls (tree newdecl, tree olddecl, bool
newdecl_is_friend)
                      olddecl);

          SET_DECL_TEMPLATE_SPECIALIZATION (olddecl);
-         DECL_COMDAT (newdecl) = DECL_DECLARED_INLINE_P (olddecl);
+         DECL_COMDAT (newdecl) = DECL_DECLARED_INLINE_P (newdecl);

          /* Don't propagate visibility from the template to the
             specialization here.  We'll do that in determine_visibility if

Reply via email to