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

--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> ---
static bool
skip_function_for_local_pure_const (struct cgraph_node *node)
{
...
  /* Save some work and do not analyze functions which are interposable and
     do not have any non-interposable aliases.  */
  if (node->get_availability () <= AVAIL_INTERPOSABLE
      && !flag_lto
      && !node->has_aliases_p ())
    {
      if (dump_file)
        fprintf (dump_file,
                 "Function is interposable; not analyzing.\n");

so clearly flag_lto is what causes us to do local pure-const anyway.  Maybe
this should add && !profile_arc_flag?  The message dumped should probably
also adjusted, like with

Function is interposable; analyzing anyway because LTO is enabled

but I fail to see why this is relevant at LTO compile-time?

Reply via email to