diff options
author | Martin Jambor <mjambor@suse.cz> | 2009-07-25 20:09:42 +0200 |
---|---|---|
committer | Martin Jambor <jamborm@gcc.gnu.org> | 2009-07-25 20:09:42 +0200 |
commit | 86631ea3dd78a0077a6f96061affe89d5e38220f (patch) | |
tree | 3c96ae42a6ff9f1334a7b02a1bd9e7eff55129ad /gcc/tree-inline.c | |
parent | 2a9de349388c25eb2d8df725d5eace68c6c2c81d (diff) | |
download | gcc-86631ea3dd78a0077a6f96061affe89d5e38220f.zip gcc-86631ea3dd78a0077a6f96061affe89d5e38220f.tar.gz gcc-86631ea3dd78a0077a6f96061affe89d5e38220f.tar.bz2 |
extend.texi (Labels as Values): Document need for noclone.
2009-07-25 Martin Jambor <mjambor@suse.cz>
* doc/extend.texi (Labels as Values): Document need for noclone.
(Function Attributes): Document noclone attribute.
* c-common.c (c_common_attribute_table): New element for noclone.
(handle_noclone_attribute): New function. Forward-declare.
* tree-inline.c (tree_versionable_function_p): Check for noclone
attribute.
* testsuite/gcc.c-torture/execute/pr17377.c: Add noclone attribute to
function y.
* testsuite/gcc.dg/ipa/noclone-1.c: New test.
From-SVN: r150086
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 3b7b666..605f91e 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -4349,7 +4349,8 @@ copy_static_chain (tree static_chain, copy_body_data * id) bool tree_versionable_function_p (tree fndecl) { - return copy_forbidden (DECL_STRUCT_FUNCTION (fndecl), fndecl) == NULL; + return (!lookup_attribute ("noclone", DECL_ATTRIBUTES (fndecl)) + && copy_forbidden (DECL_STRUCT_FUNCTION (fndecl), fndecl) == NULL); } /* Delete all unreachable basic blocks and update callgraph. |