http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53915
Bug #: 53915
Summary: gcov -f rounding problem
Classification: Unclassified
Product: gcc
Version: 4.7.1
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: gcov-profile
AssignedTo: [email protected]
ReportedBy: [email protected]
I have the following problem with gcov 4.7.1 under Debian:
ypig:/tmp/ompfr-gcov/src> gcov -f round_prec.c
Function 'mpfr_can_round_raw'
Lines executed:100.00% of 44
Function 'mpfr_can_round'
Lines executed:100.00% of 4
Function 'mpfr_prec_round'
Lines executed:100.00% of 31
Function 'mpfr_round_raw_4'
Lines executed:95.00% of 60
Function 'mpfr_round_raw_2'
Lines executed:99.99% of 9
Function 'mpfr_round_raw'
Lines executed:100.00% of 7
File 'round_prec.c'
Lines executed:100.00% of 79
Creating 'round_prec.c.gcov'
File 'round_raw_generic.c'
Lines executed:97.37% of 76
Creating 'round_raw_generic.c.gcov'
File '/usr/include/gmp-x86_64.h'
No executable lines
Removing 'gmp-x86_64.h.gcov'
See the result for Function 'mpfr_round_raw_2': 99.99% of 9. This is not
possible! Either all the lines are executed, in which case one should get 100%,
or at most 8 lines of 9 are executed, in which case one should get 88.89% at
most.
This is reproducible on a Debian/unstable amd64 machine with MPFR trunk r8346
by running the tools/coverage script.
I've also reported with bug on the Debian BTS:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=681076