aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-prop.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2010-06-28 02:10:34 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2010-06-28 00:10:34 +0000
commitd402c33dc1fa4ea0a9f133efdc18ae43b4b4c916 (patch)
tree6ab1c2265180e9232911690d3ba0715ff2be32d0 /gcc/ipa-prop.c
parente7041633a5b9ac8eb09b92de5321bf3184a7b98f (diff)
downloadgcc-d402c33dc1fa4ea0a9f133efdc18ae43b4b4c916.zip
gcc-d402c33dc1fa4ea0a9f133efdc18ae43b4b4c916.tar.gz
gcc-d402c33dc1fa4ea0a9f133efdc18ae43b4b4c916.tar.bz2
re PR middle-end/44671 (Partial inlining breaks C++)
PR middle-end/44671 PR middle-end/44686 * tree.c (build_function_decl_skip_args): Clear DECL_BUILT_IN on signature change. * ipa-split.c (split_function): Always clear DECL_BUILT_IN. * ipa-prop.c (ipa_modify_formal_parameters): Likewise. * gcc.c-torture/pr44686.c: New file. From-SVN: r161476
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r--gcc/ipa-prop.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index 3fd284b..997f8ec 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -2087,6 +2087,13 @@ ipa_modify_formal_parameters (tree fndecl, ipa_parm_adjustment_vec adjustments,
DECL_VINDEX (fndecl) = NULL_TREE;
}
+ /* When signature changes, we need to clear builtin info. */
+ if (DECL_BUILT_IN (fndecl))
+ {
+ DECL_BUILT_IN_CLASS (fndecl) = NOT_BUILT_IN;
+ DECL_FUNCTION_CODE (fndecl) = (enum built_in_function) 0;
+ }
+
/* This is a new type, not a copy of an old type. Need to reassociate
variants. We can handle everything except the main variant lazily. */
t = TYPE_MAIN_VARIANT (orig_type);