This is the mail archive of the gcc-help@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]

gcov 4.0 incorrectly marking lines as executable


We are seeing lots of problems with gcov 4.0.1 and were wondering if anyone
else has seen these and can offer some help. We are seeing cases where lines
with no executable code on them are being incorrectly marked as executable
and therefore also marked with zero coverage. For example, a class statement,
or a closing curly brace, or a line of code that is directly after a simple
statement that is marked as covered, or a line that is beyond the end of a
source file. For example, here is a .gcov file snippet (where ##### means the
line is executable but has not been hit):

        -:    7:
    #####:    8:class ClassName {
        -:    9:
        -:   10:  public:

or this case where the return statement directly after the for loop is marked
as not being covered:

       18:  507:  for (int i = 0; i < 8; i++)
       16:  508:     corners[i] = m.transform(corners[i]);
        -:  509:
    #####:  510:  return corners;

or the following, where "/*EOF*/" is not in the source file and is added by 
gcov to indicate that the line is beyond the end of the file:

    #####: /*EOF*/

Has anyone seen this sort of thing before?

(We're compiling 64-bit (x86-64) on Fedora Core 2 under kernel 2.6.8 and
using the Boost C++ libraries if that makes any difference.)

Cheers,

Martin.


---------------------------------------------------------------------------
Martin Reddy                                        Pixar Animation Studios 
                                                    1200 Park Avenue
reddy@pixar.com                                     Emeryville, CA 94608
http://MartinReddy.net/                             Tel. (510) 752 4093


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