ipa-utils.c (ipa_merge_profiles): Avoid ICE on mismatch in indirect edges.
authorJan Hubicka <hubicka@ucw.cz>
Wed, 21 Jan 2015 18:19:25 +0000 (19:19 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Wed, 21 Jan 2015 18:19:25 +0000 (18:19 +0000)
* ipa-utils.c (ipa_merge_profiles): Avoid ICE on mismatch in indirect
edges.

From-SVN: r219962

gcc/ChangeLog
gcc/ipa-utils.c

index 1c0a45e..4f3cc89 100644 (file)
@@ -1,3 +1,8 @@
+2015-01-21  Jan Hubicka  <hubicka@ucw.cz>
+
+       * ipa-utils.c (ipa_merge_profiles): Avoid ICE on mismatch in indirect
+       edges.
+
 2015-01-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
 
        * gimplify.c (gimplify_function_tree): Check the no_sanitize_thread
index 7612548..a8bb42d 100644 (file)
@@ -634,7 +634,7 @@ ipa_merge_profiles (struct cgraph_node *dst,
                   speculations when merging.  */
                gcc_unreachable ();
            }
-         else if (e2->speculative)
+         else if (e2 && e2->speculative)
            {
              cgraph_edge *direct, *indirect;
              ipa_ref *ref;