This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
gcov fails on c++ code
- To: gcc-bugs at gcc dot gnu dot org
- Subject: gcov fails on c++ code
- From: David Faitelson <davidf at tti-telecom dot com>
- Date: Wed, 04 Jul 2001 11:03:40 +0300
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.