This patch fixes LIPO ICE that an unresolved node escaped after lipo fixup.
testing on going. OK for google-4_9?
Thanks,
Dehao
Index: gcc/ipa.c
===================================================================
--- gcc/ipa.c (revision 210864)
+++ gcc/ipa.c (working copy)
@@ -39,6 +39,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-inline.h"
#include "profile.h"
#include "params.h"
+#include "l-ipo.h"
/* Return true when NODE can not be local. Worker for cgraph_local_node_p. */
@@ -195,6 +196,9 @@ walk_polymorphic_call_targets (pointer_set_t *reac
{
struct cgraph_node *n = targets[i];
+ if (L_IPO_COMP_MODE && cgraph_pre_profiling_inlining_done)
+ n = cgraph_lipo_get_resolved_node (n->decl);
+
/* Do not bother to mark virtual methods in anonymous namespace;
either we will find use of virtual table defining it, or it is
unused. */