From e9e707983b9b64f5344e1892e4a065cd31dd959d Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Sun, 6 Dec 2015 06:45:16 +0100 Subject: [PATCH] * ipa-icf.c (sem_function::merge): Check that local_original exists. From-SVN: r231328 --- gcc/ChangeLog | 4 ++++ gcc/ipa-icf.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0d4e6f2decf..62a4d3c5747 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2015-12-05 Jan Hubicka + + * ipa-icf.c (sem_function::merge): Check that local_original exists. + 2015-12-05 David Edelsohn PR target/68609 diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c index 18039ef7afd..0029a48a61b 100644 --- a/gcc/ipa-icf.c +++ b/gcc/ipa-icf.c @@ -1359,7 +1359,9 @@ sem_function::merge (sem_item *alias_item) { if (dump_file) fprintf (dump_file, "Dropping merged_comdat flag.\n\n"); - local_original->merged_comdat = original->merged_comdat = false; + if (local_original) + local_original->merged_comdat = false; + original->merged_comdat = false; } if (remove) -- 2.30.2