diff options
Diffstat (limited to 'gcc/ipa.c')
-rw-r--r-- | gcc/ipa.c | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -543,14 +543,15 @@ cgraph_address_taken_from_non_vtable_p (struct cgraph_node *node) int i; struct ipa_ref *ref; for (i = 0; ipa_ref_list_reference_iterate (&node->ref_list, i, ref); i++) - { - struct varpool_node *node; - if (ref->refered_type == IPA_REF_CGRAPH) - return true; - node = ipa_ref_varpool_node (ref); - if (!DECL_VIRTUAL_P (node->decl)) - return true; - } + if (ref->use == IPA_REF_ADDR) + { + struct varpool_node *node; + if (ref->refered_type == IPA_REF_CGRAPH) + return true; + node = ipa_ref_varpool_node (ref); + if (!DECL_VIRTUAL_P (node->decl)) + return true; + } return false; } |