aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-sra.c
diff options
context:
space:
mode:
authorJie Zhang <jie@codesourcery.com>2010-07-23 14:47:46 +0000
committerJie Zhang <jiez@gcc.gnu.org>2010-07-23 14:47:46 +0000
commit61044492190ca68b74f5e9757584f4c3c0c0654c (patch)
treeb7192056c818495d64ebed95b109b7adcbf4d7e8 /gcc/tree-sra.c
parent9477ccb2b1e059f639abf2483893f2b950d34fed (diff)
downloadgcc-61044492190ca68b74f5e9757584f4c3c0c0654c.zip
gcc-61044492190ca68b74f5e9757584f4c3c0c0654c.tar.gz
gcc-61044492190ca68b74f5e9757584f4c3c0c0654c.tar.bz2
re PR target/44290 (__naked attribute is broken)
PR target/44290 * attribs.c (decl_attributes): Insert "noinline" and "noclone" if "naked". * tree-sra.c (ipa_sra_preliminary_function_checks): Return false if ! tree_versionable_function_p. testsuite/ PR target/44290 * gcc.dg/pr44290-1.c: New test. * gcc.dg/pr44290-2.c: New test. From-SVN: r162466
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r--gcc/tree-sra.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 2ac6458..2bd9f97 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -4301,6 +4301,13 @@ modify_function (struct cgraph_node *node, ipa_parm_adjustment_vec adjustments)
static bool
ipa_sra_preliminary_function_checks (struct cgraph_node *node)
{
+ if (!tree_versionable_function_p (current_function_decl))
+ {
+ if (dump_file)
+ fprintf (dump_file, "Function isn't allowed to be versioned.\n");
+ return false;
+ }
+
if (!cgraph_node_can_be_local_p (node))
{
if (dump_file)