diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-02-02 18:56:33 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-02-02 18:56:33 +0000 |
commit | ac66ebf1eafd4746383a8288b531305e4f8aef14 (patch) | |
tree | df688f58672abd79650138829dcf8c5fc787554b /gcc/ipa-prop.c | |
parent | ca09e31c72f3772e08a5e475399a48416d518f92 (diff) | |
download | gcc-ac66ebf1eafd4746383a8288b531305e4f8aef14.tar.gz |
* ipa-prop.c (update_jump_functions_after_inlining): When type is not
preserverd by passthrough, do not propagate the type.
* g++.dg/ipa/devirt-23.C: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207405 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r-- | gcc/ipa-prop.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index af2e22392b0..f8a1ca4f3d4 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -2359,10 +2359,13 @@ update_jump_functions_after_inlining (struct cgraph_edge *cs, dst->type = IPA_JF_UNKNOWN; break; case IPA_JF_KNOWN_TYPE: - ipa_set_jf_known_type (dst, - ipa_get_jf_known_type_offset (src), - ipa_get_jf_known_type_base_type (src), - ipa_get_jf_known_type_base_type (src)); + if (ipa_get_jf_pass_through_type_preserved (dst)) + ipa_set_jf_known_type (dst, + ipa_get_jf_known_type_offset (src), + ipa_get_jf_known_type_base_type (src), + ipa_get_jf_known_type_base_type (src)); + else + dst->type = IPA_JF_UNKNOWN; break; case IPA_JF_CONST: ipa_set_jf_cst_copy (dst, src); |