diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-04 18:29:03 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-04 18:29:03 +0000 |
commit | 32de3b92725b8acd87fb4511651602e68f474130 (patch) | |
tree | 1163da82a2e60b73864668cdd54636ba6277fe01 /gcc/ipa-prop.c | |
parent | f230ef81030498353b6f11553ffa76e81d27621a (diff) | |
download | gcc-32de3b92725b8acd87fb4511651602e68f474130.tar.gz |
* g++.dg/ipa/devirt-46.C: New testcase.
* ipa-prop.c (ipa_compute_jump_functions_for_edge): Call
get_dynamic_type; drop TODO.
* ipa-polymorphic-call.c
(ipa_polymorphic_call_context::get_dynamic_type): Be ready
for otr_type to be unknown.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215890 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r-- | gcc/ipa-prop.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index c5bcb3a908f..d5ecea41303 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -1898,10 +1898,11 @@ ipa_compute_jump_functions_for_edge (struct func_body_info *fbi, tree param_type = ipa_get_callee_param_type (cs, n); if (flag_devirtualize && POINTER_TYPE_P (TREE_TYPE (arg))) { + tree instance; struct ipa_polymorphic_call_context context (cs->caller->decl, arg, cs->call_stmt, - NULL); - /* TODO: We should also handle dynamic types. */ + &instance); + context.get_dynamic_type (instance, arg, NULL, cs->call_stmt); *ipa_get_ith_polymorhic_call_context (args, n) = context; if (!context.useless_p ()) useful_context = true; |