* Fix ICE in updating inline summaries
@ 2019-10-28 8:34 Jan Hubicka
0 siblings, 0 replies; only message in thread
From: Jan Hubicka @ 2019-10-28 8:34 UTC (permalink / raw)
To: gcc-patches
Hi,
my yesterday patch introduced ICE on combining -O2 and -O0 translation
units (since the second has missing summary).
Bootstrapped/regtested x86_64-linux, comitted.
Honza
* ipa-fnsummary.c (ipa_merge_fn_summary_after_inlining): Check
for missing EDGE_REF
* ipa-prop.c (update_jump_functions_after_inlining): Likewise.
Index: ipa-fnsummary.c
===================================================================
--- ipa-fnsummary.c (revision 277503)
+++ ipa-fnsummary.c (working copy)
@@ -3315,7 +3315,7 @@ ipa_merge_fn_summary_after_inlining (str
if (ipa_node_params_sum && callee_info->conds)
{
class ipa_edge_args *args = IPA_EDGE_REF (edge);
- int count = ipa_get_cs_argument_count (args);
+ int count = args ? ipa_get_cs_argument_count (args) : 0;
int i;
if (count)
Index: ipa-prop.c
===================================================================
--- ipa-prop.c (revision 277503)
+++ ipa-prop.c (working copy)
@@ -2741,7 +2741,7 @@ update_jump_functions_after_inlining (st
/* We must check range due to calls with variable number of arguments
and we cannot combine jump functions with operations. */
if (dst->value.pass_through.operation == NOP_EXPR
- && (dst->value.pass_through.formal_id
+ && (top && dst->value.pass_through.formal_id
< ipa_get_cs_argument_count (top)))
{
int dst_fid = dst->value.pass_through.formal_id;
@@ -3430,7 +3430,7 @@ update_indirect_edges_after_inlining (st
continue;
/* We must check range due to calls with variable number of arguments: */
- if (ici->param_index >= ipa_get_cs_argument_count (top))
+ if (!top || ici->param_index >= ipa_get_cs_argument_count (top))
{
ici->param_index = -1;
continue;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-10-28 8:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-28 8:34 Fix ICE in updating inline summaries Jan Hubicka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).