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

--- Comment #15 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jan Hubicka from comment #14)
> I am testing
> diff --git a/gcc/ipa-pure-const.cc b/gcc/ipa-pure-const.cc
> index 5024e488692..af94e5e3b74 100644
> --- a/gcc/ipa-pure-const.cc
> +++ b/gcc/ipa-pure-const.cc
> @@ -1481,7 +1481,6 @@ 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)

Thanks, meanwhile I verified that the following fixes things as well, but
I like your variant more.

diff --git a/gcc/ipa-pure-const.cc b/gcc/ipa-pure-const.cc
index 5024e488692..5684e674ffc 100644
--- a/gcc/ipa-pure-const.cc
+++ b/gcc/ipa-pure-const.cc
@@ -1482,6 +1482,7 @@ skip_function_for_local_pure_const (struct cgraph_node
*node)
      do not have any non-interposable aliases.  */
   if (node->get_availability () <= AVAIL_INTERPOSABLE
       && !flag_lto
+      && !profile_arc_flag
       && !node->has_aliases_p ())
     {
       if (dump_file)

Reply via email to