Fix gcc.dg/tree-prof/crossmodule-indircall-1.c

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Fix gcc.dg/tree-prof/crossmodule-indircall-1.c

Jan Hubicka-2
Hi,
this patch fixes reversed test I managed to get into last minute cleanup
of a patch.  It also fixes ICE when descriptors are missing.  This
happens during profiledbootstrap though I will further look into why
such infos are around at all.

Bootstrapped/regtested x86_64-linux, comitted.

        PR ipa/92498
        * ipa-profile.c (check_argument_count): Do not ice when descriptors
        is NULL.
        (ipa_profile): Fix reversed test.

Index: ipa-profile.c
===================================================================
--- ipa-profile.c (revision 278124)
+++ ipa-profile.c (working copy)
@@ -487,6 +487,8 @@ check_argument_count (struct cgraph_node
   class ipa_node_params *info = IPA_NODE_REF (n->function_symbol ());
   if (!info)
     return true;
+  if (!info->descriptors)
+    return true;
   ipa_edge_args *e_info = IPA_EDGE_REF (e);
   if (!e)
     return true;
@@ -620,7 +622,7 @@ ipa_profile (void)
  "Not speculating: target is overwritable "
  "and can be discarded.\n");
     }
-  else if (check_argument_count (n2, e))
+  else if (!check_argument_count (n2, e))
     {
       nmismatch++;
       if (dump_file)