aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2011-06-14 16:25:57 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2011-06-14 14:25:57 +0000
commitd2640c430fcce5cd42c60f361eb3f0ac1a048a48 (patch)
tree882b8fec1b53f7cb64f5d16e4abf1b4e868cfcfa /gcc/ipa.c
parentde38eefaa72cbf065d501f7548471c42621c4e73 (diff)
downloadgcc-d2640c430fcce5cd42c60f361eb3f0ac1a048a48.zip
gcc-d2640c430fcce5cd42c60f361eb3f0ac1a048a48.tar.gz
gcc-d2640c430fcce5cd42c60f361eb3f0ac1a048a48.tar.bz2
* ipa.c (cgraph_address_taken_from_non_vtable_p): Check the ref type.
From-SVN: r175021
Diffstat (limited to 'gcc/ipa.c')
-rw-r--r--gcc/ipa.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/gcc/ipa.c b/gcc/ipa.c
index 0edb344..62510c6 100644
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -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;
}