* ipa-icf.c (sem_function::merge): Check that local_original exists.
authorJan Hubicka <hubicka@ucw.cz>
Sun, 6 Dec 2015 05:45:16 +0000 (06:45 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sun, 6 Dec 2015 05:45:16 +0000 (05:45 +0000)
From-SVN: r231328

gcc/ChangeLog
gcc/ipa-icf.c

index 0d4e6f2decf0ed8ddbe612c1b37a880a9f043194..62a4d3c5747cf99e07c7b0e4574538fbfce39196 100644 (file)
@@ -1,3 +1,7 @@
+2015-12-05  Jan Hubicka  <hubicka@ucw.cz>
+
+       * ipa-icf.c (sem_function::merge): Check that local_original exists.
+
 2015-12-05  David Edelsohn  <dje.gcc@gmail.com>
 
        PR target/68609
index 18039ef7afd9062972f73302e2ef5e18cd6cb228..0029a48a61b1e70c9dded660134a957155d58431 100644 (file)
@@ -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)