On Wed, Apr 20, 2022 at 10:45:53AM +0200, Jan Hubicka wrote:
> So this change should be unnecessary unless there are nodes that are
> missing finalization stage.  It also is not good enough since frontends
> may change opt_for_fn between node creation and finalization of
> compilation unit (so even after cgraph_finalize unforutnately, we had
> another bug about that).
> 
> The PR was about implicit C++ alias.  So the problem is that aliases
> bypass finalization becuase they are produced by
> cgraph_node::create_alias that sets definition flag to true.

Note, I've already committed the patch as Richi acked it.
So, can we move that
  node->semantic_interposition = opt_for_fn (decl, flag_semantic_interposition);
from cgraph_node::create to cgraph_node::create_alias?

> I guess it would be most consistent to give up on having the flag up to
> date during cgraph construction (i.e. from finalization time down) and
> compute it during the cgraph_finalize_complation_unit.  I will look into
> that.

        Jakub

Reply via email to