public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PR 79579] Avoid segfault on NULL ipa_edge_args_vector
@ 2017-02-21 13:53 Martin Jambor
  0 siblings, 0 replies; only message in thread
From: Martin Jambor @ 2017-02-21 13:53 UTC (permalink / raw)
  To: GCC Patches

Hi,

in, PR 79579, early inliner creates ipa_node_params_sum which is then
tested by ipa_prop_write_jump_functions to figure out whether there
has been anything to stream out when there is not.

The following patch improves the test - when there are no jump
function, there is no point in streaming jump functions or any ipa-cp
info in general.

Bootstrapped and tested on x86_64-linux, I will commit it momentarily
as obvious.

Thanks,

Martin


2017-02-20  Martin Jambor  <mjambor@suse.cz>

	PR lto/79579
	* ipa-prop.c (ipa_prop_write_jump_functions): Bail out if no edges
	have been analyzed.
---
 gcc/ipa-prop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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.11.0

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-02-21 12:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-21 13:53 [PR 79579] Avoid segfault on NULL ipa_edge_args_vector Martin Jambor

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).