https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110827
--- Comment #11 from Iain Sandoe <iains at gcc dot gnu.org> --- (In reply to Michael Duggan from comment #9) > More data: > The coroutine actor is marked as artificial in > coro_build_actor_or_destroy_function. As a result, it is completely ignored > by gcov. In gcov's process_all_functions function, artificial functions are > removed from the set of functions to consider. This may not be the only > problem, but this will definitely prevent things from working. > > The marking is not incorrect. The actor function is artificial. But, > unlike most artificial functions, it is built using the body of an actual > function. I'm not certain how that should be dealt with. right, so I wonder what happens: 1. if you temporarily patch the C++ FE to make the "actor" function non-artificial (it is actually a combination of compiler-generated, artificial, code and the outlined user's function body). 2. if we reorganised things to have a non-artificial outlined actor but have that called via two 'shim' functions (one for resume() and one for destroy()) - and have those two functions as artificial. 3. if an artificial function is inlined into a non-artificial one? 4. if a non-artificial function is inlined into an artificial one? (I am not too familiar with how the coverage code interacts with other things)