Commit 448476ff by Tom de Vries Committed by Tom de Vries

Safely use nodes[0] in possible_polymorphic_call_targets

2016-03-16  Tom de Vries  <tom@codesourcery.com>

	PR lto/70187
	* ipa-devirt.c (possible_polymorphic_call_targets): Move
	nodes.length () == 1 test to before first nodes[0] access.

From-SVN: r234253
parent b462f860
2016-03-16 Tom de Vries <tom@codesourcery.com>
PR lto/70187
* ipa-devirt.c (possible_polymorphic_call_targets): Move
nodes.length () == 1 test to before first nodes[0] access.
2016-03-16 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/68715
* graphite-scop-detection.c (scop_detection::merge_sese): Add missing
single_pred_p test.
......
......@@ -3178,10 +3178,10 @@ possible_polymorphic_call_targets (tree otr_type,
if (!outer_type->all_derivations_known)
{
if (!speculative && final_warning_records
&& nodes.length () == 1
&& TREE_CODE (TREE_TYPE (nodes[0]->decl)) == METHOD_TYPE)
{
if (complete
&& nodes.length () == 1
&& warn_suggest_final_types
&& !outer_type->derived_types.length ())
{
......@@ -3197,7 +3197,6 @@ possible_polymorphic_call_targets (tree otr_type,
}
if (complete
&& warn_suggest_final_methods
&& nodes.length () == 1
&& types_same_for_odr (DECL_CONTEXT (nodes[0]->decl),
outer_type->type))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment