[PR 79579] Avoid segfault on NULL ipa_edge_args_vector
authorMartin Jambor <mjambor@suse.cz>
Tue, 21 Feb 2017 14:01:52 +0000 (15:01 +0100)
committerMartin Jambor <jamborm@gcc.gnu.org>
Tue, 21 Feb 2017 14:01:52 +0000 (15:01 +0100)
2017-02-21  Martin Jambor  <mjambor@suse.cz>

PR lto/79579
* ipa-prop.c (ipa_prop_write_jump_functions): Bail out if no edges
have been analyzed.

From-SVN: r245628

gcc/ChangeLog
gcc/ipa-prop.c

index 3f398f49be91c2eef4873e6dd09ac3578f3db38c..1286f16d5462e971ce09d66e620944fb8cbbae0c 100644 (file)
@@ -1,3 +1,9 @@
+2017-02-21  Martin Jambor  <mjambor@suse.cz>
+
+       PR lto/79579
+       * ipa-prop.c (ipa_prop_write_jump_functions): Bail out if no edges
+       have been analyzed.
+
 2017-02-21  Martin Jambor  <mjambor@suse.cz>
 
        * common.opt (-fipa-cp-alignment): Mark as ignored and preserved
index e4e44ce20c693990da5393bc6538facdc9aa102e..33503d4befcb3191ac11b3840273224e604e369e 100644 (file)
@@ -5040,7 +5040,7 @@ ipa_prop_write_jump_functions (void)
   lto_symtab_encoder_iterator lsei;
   lto_symtab_encoder_t encoder;
 
-  if (!ipa_node_params_sum)
+  if (!ipa_node_params_sum || !ipa_edge_args_vector)
     return;
 
   ob = create_output_block (LTO_section_jump_functions);