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

--- Comment #11 from rguenther at suse dot de <rguenther at suse dot de> ---
On Mon, 23 Feb 2026, pheeck at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116526
> 
> --- Comment #10 from Filip Kastl <pheeck at gcc dot gnu.org> ---
> So the call to 'cleanup_tree_cfg ()' in 'tree-profile.cc:tree_profiling ()'
> removes __gcov3 from GIMPLE.  Then eventually 
> 'symtab->remove_unreachable_nodes
> ()' in 'ipa_passes ()' removes __gcov3 from the symbol table.  But then
> 'ipa_passes ()' calls 'coverage_finish ()' which adds __gcov3 back into the
> symbol table.
> 
> That doesn't seem right.  Why add __gcov3 into the symbol table when it isn't
> referenced in the IL anymore.

I guess coverage should either mark the symbol as used early or deal
with the case it is removed.

Reply via email to