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

Message ID
State New
Headers show
  • Fix gcc.dg/tree-prof/crossmodule-indircall-1.c
Related show

Commit Message

Jan Hubicka Nov. 13, 2019, 7:47 p.m.
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))
 		      if (dump_file)