summaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
authorjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-25 18:09:42 +0000
committerjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-25 18:09:42 +0000
commitbdb1f0d12f7e167895579014a5dc03611c68e090 (patch)
tree3c96ae42a6ff9f1334a7b02a1bd9e7eff55129ad /gcc/tree-inline.c
parentf4fbb22b9aa70e9ae69e6980aee6daeef241a484 (diff)
downloadgcc-bdb1f0d12f7e167895579014a5dc03611c68e090.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150086 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r--gcc/tree-inline.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 3b7b666c984..605f91ef1a9 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.