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

--- Comment #7 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
Here is my understanding of the issue:

The problem appears when ipa-inline (at `a.cpp.089i.inline` pass) tries to
inline:

    a.cpp:5:9: note: Inlining void emit(void (*)())/1 to static void S::sm()/2
with frequency 1.00

Before the inline `S::sm` belonged to `comdat_group:_ZN1S2smEv` and did not
call any other comdat groups directly (`printChar()` was an indirect call).

After the inline `emit(printChar)` caused `S::sm()` to call `printChat()`
directly and now both are part of one `comdat_group`.

The discrepancy between calls_comdat_local=0 / check_calls_comdat_local_p ()=1
probably comes from a missing step to update the function summary after
resolving the indirection.

Reply via email to