This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Coverage of templates
- From: Anders Peter Fugmann <afu at fugmann dot net>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 08 Nov 2006 22:18:33 +0100
- Subject: Coverage of templates
Hi,
I'm trying to examine the coverage of some template classes, which are
defined (and implemented) in header files.
Compiling test programs that includes the header files with the template
definitions / implementations with '-ftest-coverage -fprofile-arcs' does
not seem to emit basic blocks for template member functions that are not
referenced. Is there a way to instruct gcc to emit basic blocks for
these functions as well, in order to have gcov notice that the member
functions have an executions count of zero?
I have tried almost any flag to have gcc emit the missing basic-blocks:
-O0 -fkeep-inline-function -fno-default-inline -fno-inline
but still the basic blocks for the template member functions seems missing.
Searching the archives found a mail for the same problem, but no answer
was given (http://gcc.gnu.org/ml/gcc-help/2004-09/msg00056.html).
Using gcc version 4.1
Thanks
Anders