re PR ipa/92498 (gcc.dg/tree-prof/crossmodule-indircall-1.c fails starting with r278100)
authorJan Hubicka <hubicka@ucw.cz>
Wed, 13 Nov 2019 19:44:35 +0000 (20:44 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Wed, 13 Nov 2019 19:44:35 +0000 (19:44 +0000)
PR ipa/92498
* ipa-profile.c (check_argument_count): Do not ICE when descriptors
is NULL.
(ipa_profile): Fix reversed test.

From-SVN: r278157

gcc/ChangeLog
gcc/ipa-profile.c

index 25fee66aebba49e7b2118acbc73550cdbe77630a..6d8e7c63c1730ed090ef7fc29caf5f8a59ad45bf 100644 (file)
@@ -1,3 +1,10 @@
+2019-11-13  Jan Hubicka  <hubicka@ucw.cz>
+
+       PR ipa/92498
+       * ipa-profile.c (check_argument_count): Do not ICE when descriptors
+       is NULL.
+       (ipa_profile): Fix reversed test.
+
 2019-11-13  Jan Hubicka  <hubicka@ucw.cz>
 
        * ipa-cp.c (ignore_edge_p): Do not check caller flags.
index cd354d1a73eec307c704211d12d0b9251251d120..c6976431a839940ca9774575f18f946abe8c430e 100644 (file)
@@ -487,6 +487,8 @@ check_argument_count (struct cgraph_node *n, struct cgraph_edge *e)
   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)