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
This commit is contained in:
parent
b462f86075
commit
448476ff53
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
@ -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))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user