gnu/gcc/9c09713871ad6d05e1bd2bd65cb3c78c823cb42e Compare right field when printing summary
The check
if (coverage->calls && coverage->calls == 0)
will always be false (as reported by -Wlogical-op) and broken. I
don't think there is a test suite for function summaries so this was
not caught earlier.
The logic is a bit awkward and could've been flipped to avoid checking
calls_suppressed twice. When it was written I wanted to minimize
patch and preserve the "natural" order, since the suppression pragma
is an opt-in, in a way.
PR gcov-profile/127408
gcc/ChangeLog:
* gcov.cc (function_summary): Check calls_suppressed, not calls.
1 file changed