http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51449
Nathan Sidwell <nathan at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2011-12-07 Ever Confirmed|0 |1 --- Comment #2 from Nathan Sidwell <nathan at gcc dot gnu.org> 2011-12-07 20:35:18 UTC --- Crud, not doing very well, am I? Here's a reduced testcase: template <typename T> struct TPL { int Baz (); int Foo () { return Baz (); } }; extern template struct TPL<char>; void Bar (TPL<char> *ptr) { ptr->Foo (); } nathan@cartagia:53>./cc1plus -fprofile-arcs tpl.ii -Ofast nathan@cartagia:53>grep gcov0 tpl.s addl $1, __gcov0__Z3BarP3TPLIcE adcl $0, __gcov0__Z3BarP3TPLIcE+4 addl $1, __gcov0__ZN3TPLIcE3FooEv adcl $0, __gcov0__ZN3TPLIcE3FooEv+4 addl $1, __gcov0__ZN3TPLIcE3FooEv+8 adcl $0, __gcov0__ZN3TPLIcE3FooEv+12 addl $1, __gcov0__Z3BarP3TPLIcE+8 adcl $0, __gcov0__Z3BarP3TPLIcE+12 .local __gcov0__Z3BarP3TPLIcE .comm __gcov0__Z3BarP3TPLIcE,16,8 .long __gcov0__Z3BarP3TPLIcE Notice __gcov0__ZN3TPLIcE3FooEv is referenced but not defined.