https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107906
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Known to fail| |4.1.2 Summary|Function template |linkage of template not |specialization given weak |taken into account |rather than local symbol | --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- >specializations That is not a specialization, that is an instantiation. >So it's somehow a mistake of function templates. It is not function templates which is causing the issue. Rather than it is template taking another template type which is causing issues. E.g. ``` namespace { template<class> struct Y{}; } template<template<class> class Q> struct f{ f(){__builtin_printf("Hello.\n");} }; f<Y> z; ``` f<Y>'s ctor is emitted as a weak symbol.