re PR ipa/92242 (LTO ICE in ipa_get_cs_argument_count ipa-prop.h:598)
authorJan Hubicka <hubicka@ucw.cz>
Mon, 28 Oct 2019 08:19:56 +0000 (09:19 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Mon, 28 Oct 2019 08:19:56 +0000 (08:19 +0000)
PR ipa/92242
* ipa-fnsummary.c (ipa_merge_fn_summary_after_inlining): Check
for missing EDGE_REF
* ipa-prop.c (update_jump_functions_after_inlining): Likewise.

From-SVN: r277504

gcc/ChangeLog
gcc/ipa-fnsummary.c
gcc/ipa-prop.c

index 9511081cb581ee1d7b4fa6bbd2e35ab84727dfed..9ef181f28374289e4cad3accf7b7cdb97a79b382 100644 (file)
@@ -1,3 +1,10 @@
+2019-10-25  Jan Hubicka  <hubicka@ucw.cz>
+
+       PR ipa/92242
+       * ipa-fnsummary.c (ipa_merge_fn_summary_after_inlining): Check
+       for missing EDGE_REF
+       * ipa-prop.c (update_jump_functions_after_inlining): Likewise.
+
 2019-10-25  Jiufu Guo  <guojiufu@linux.ibm.com>            
 
        PR tree-optimization/88760
index ce384dfc9f0c26f032f971639eefb66171533a34..0d38e42546de524b3197d53da3b28681afe95e8d 100644 (file)
@@ -3315,7 +3315,7 @@ ipa_merge_fn_summary_after_inlining (struct cgraph_edge *edge)
   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 edab920e8f494c6a2fd6a31476b715c2e990da0a..0dd735614191fe1b58cee9e2e28901b0a39f9553 100644 (file)
@@ -2741,7 +2741,7 @@ update_jump_functions_after_inlining (struct cgraph_edge *cs,
          /* 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 (struct cgraph_edge *cs,
        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;