https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61659
--- Comment #25 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- (In reply to Jason Merrill from comment #24) > Created attachment 33407 [details] > Patch for 4.9 > > Here's a patch for the 4.9 branch. I'm nervous about applying it because I > suspect that we haven't yet found all the effects of setting DECL_COMDAT. I've tested your patch and it causes a qt-5.4 build failure (also happens on trunk): markus@x4 WebCore % cat Font.ii namespace WTF { template <typename T> inline void deleteOwnedPtr (T *); } namespace WebCore { class TextLayout; } namespace WTF { template <> void deleteOwnedPtr (WebCore::TextLayout *) { } } (Without your patch:) markus@x4 WebCore % g++ -c -O2 Font.ii markus@x4 WebCore % nm Font.o 0000000000000000 T _ZN3WTF14deleteOwnedPtrIN7WebCore10TextLayoutEEEvPT_ (with patch applied) markus@x4 WebCore % g++ -c -O2 Font.ii markus@x4 WebCore % nm Font.o markus@x4 WebCore %