This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug ipa/61659] [4.9 Regression] Extra undefined symbol because of devirtualization


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]