[Bug gcov-profile/110827] C++20 coroutines aren't being measured by gcov

mwd at md5i dot com gcc-bugzilla@gcc.gnu.org
Thu Jul 27 17:34:16 GMT 2023


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110827

--- Comment #4 from Michael Duggan <mwd at md5i dot com> ---
I should be more explicit.  The `std::cout` line in the example is just a
placeholder for "does some work here," and this example is specifically the
simplest version of a coroutine I could come up with that would demonstrate the
problem.  When I initially encountered this problem, I was doing coverage
testing that included a coroutine that was over 70 lines long, includes lots of
loops and branching, and exited and re-entered multiple times via `co_yield`. 
I wanted to know if my test programs properly covered all of the branches.  It
is not enough to know how many times the coroutine itself is called.


More information about the Gcc-bugs mailing list