aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/ipa-cp.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/ipa-cp.c')
-rw-r--r--gcc-4.9/gcc/ipa-cp.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/gcc-4.9/gcc/ipa-cp.c b/gcc-4.9/gcc/ipa-cp.c
index b71048acc..689378a73 100644
--- a/gcc-4.9/gcc/ipa-cp.c
+++ b/gcc-4.9/gcc/ipa-cp.c
@@ -884,8 +884,9 @@ ipcp_verify_propagated_values (void)
{
if (dump_file)
{
+ dump_symtab (dump_file);
fprintf (dump_file, "\nIPA lattices after constant "
- "propagation:\n");
+ "propagation, before gcc_unreachable:\n");
print_all_lattices (dump_file, true, false);
}
@@ -1639,11 +1640,18 @@ ipa_get_indirect_edge_target_1 (struct cgraph_edge *ie,
return NULL_TREE;
target = gimple_get_virt_method_for_binfo (token, binfo);
}
-#ifdef ENABLE_CHECKING
- if (target)
- gcc_assert (possible_polymorphic_call_target_p
- (ie, cgraph_get_node (target)));
-#endif
+
+ if (target && !possible_polymorphic_call_target_p (ie,
+ cgraph_get_node (target)))
+ {
+ if (dump_file)
+ fprintf (dump_file,
+ "Type inconsident devirtualization: %s/%i->%s\n",
+ ie->caller->name (), ie->caller->order,
+ IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (target)));
+ target = builtin_decl_implicit (BUILT_IN_UNREACHABLE);
+ cgraph_get_create_node (target);
+ }
return target;
}
@@ -2804,9 +2812,7 @@ create_specialized_node (struct cgraph_node *node,
if (aggvals)
ipa_dump_agg_replacement_values (dump_file, aggvals);
}
- gcc_checking_assert (ipa_node_params_vector.exists ()
- && (ipa_node_params_vector.length ()
- > (unsigned) cgraph_max_uid));
+ ipa_check_create_node_params ();
update_profiling_info (node, new_node);
new_info = IPA_NODE_REF (new_node);
new_info->ipcp_orig_node = node;