* cgraph.c (cgraph_speculative_call_info): Fix ref lookup
authorJan Hubicka <jh@suse.cz>
Sat, 31 Aug 2013 13:37:48 +0000 (15:37 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sat, 31 Aug 2013 13:37:48 +0000 (13:37 +0000)
From-SVN: r202129

gcc/ChangeLog
gcc/cgraph.c

index 2168c4bfaf3a8e010623a9b532486233c496f070..5666ce03846ca8aa7cba02291ddc8698322f8293 100644 (file)
@@ -1,3 +1,7 @@
+2013-08-31  Jan Hubicka  <jh@suse.cz>
+
+       * cgraph.c (cgraph_speculative_call_info): Fix ref lookup
+
 2013-08-31  Jan Hubicka  <jh@suse.cz>
 
        * basic-block.h (apply_scale): Make scale parmeter gcov_type.
index d89522432b3e583ae798639dff0592f1ed6b7da8..88d7d985419718ffd46272c7bb80abe5ee024d5f 100644 (file)
@@ -1151,7 +1151,7 @@ cgraph_speculative_call_info (struct cgraph_edge *e,
                                              i, ref); i++)
     if (ref->speculative
        && ((ref->stmt && ref->stmt == e->call_stmt)
-           || (ref->lto_stmt_uid == e->lto_stmt_uid)))
+           || (!ref->stmt && ref->lto_stmt_uid == e->lto_stmt_uid)))
       {
        reference = ref;
        break;