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

gcov fails on c++ code


Hi,

The gcov that comes with gcc3.0 fails on c++ code that uses
the STL. For example, 

> #include <iostream>
> 
> using std::cout;
> 
> int main() {
> 	int i=0;
> 	cout << i;
> 	return 0;
> }
 
I compiled this program this with -ftest-coverage -fprofile-arcs. 
Then I run gcov on it, and gcov crashed.

I used gdb to track the cause of the crash and discovered that 
the program fails because the total number of arcs in the .bbg
file is larger than the sum of the number of arcs on each basic
block. (gcov.c:553) 

Who is wrong ? is the .bbg file faulty, or is it gcov ?

David.


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