https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117415
--- Comment #3 from Jørgen Kvalsvik <j at lambda dot is> --- >From a quick look it seems like the problem is fundamentally the difference in how gcc counts executions (on the basic block) and how that is mapped to lines. I don't know if there a complete fix if the expectation is lines [1], other than maybe applying some heuristics to not count multiple basic blocks in a straight line that map to the same line. [1] For example, you can remove all newlines from the source and it would most likely still be a valid C program. How would you count "lines executed"?