This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix gcc.dg/tree-prof/crossmodule-indircall-1.c
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 13 Nov 2019 20:47:11 +0100
- Subject: Fix gcc.dg/tree-prof/crossmodule-indircall-1.c
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)