From 03108bad95b96d9dad75dc99482d652ea9a749c5 Mon Sep 17 00:00:00 2001 From: Martin Jambor Date: Tue, 21 Feb 2017 15:01:52 +0100 Subject: [PATCH] [PR 79579] Avoid segfault on NULL ipa_edge_args_vector 2017-02-21 Martin Jambor PR lto/79579 * ipa-prop.c (ipa_prop_write_jump_functions): Bail out if no edges have been analyzed. From-SVN: r245628 --- gcc/ChangeLog | 6 ++++++ gcc/ipa-prop.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3f398f49be9..1286f16d546 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-02-21 Martin Jambor + + PR lto/79579 + * ipa-prop.c (ipa_prop_write_jump_functions): Bail out if no edges + have been analyzed. + 2017-02-21 Martin Jambor * common.opt (-fipa-cp-alignment): Mark as ignored and preserved diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index e4e44ce20c6..33503d4befc 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -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); -- 2.30.2