aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2020-10-27 09:02:22 +0100
committerJan Hubicka <jh@suse.cz>2020-10-27 09:02:22 +0100
commit5707996c14fcbbe9e71f97e703f0f5767b1f0611 (patch)
treed7ec03cfe5df78bcbfa8e167567f80044181c687 /gcc/tree.c
parentb53f709d92396c60d3f4ed97985137b13f853746 (diff)
downloadgcc-5707996c14fcbbe9e71f97e703f0f5767b1f0611.zip
gcc-5707996c14fcbbe9e71f97e703f0f5767b1f0611.tar.gz
gcc-5707996c14fcbbe9e71f97e703f0f5767b1f0611.tar.bz2
Fix builtin decls generated in tree.c
* tree.c (set_call_expr_flags): Fix string for ECF_RET1. (build_common_builtin_nodes): Do not set ECF_RET1 for memcpy, memmove, and memset. They are handled by builtin_fnspec.
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 6759ac8..218dc00 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -10514,7 +10514,7 @@ set_call_expr_flags (tree decl, int flags)
if (flags & ECF_RET1)
DECL_ATTRIBUTES (decl)
= tree_cons (get_identifier ("fn spec"),
- build_tree_list (NULL_TREE, build_string (1, "1")),
+ build_tree_list (NULL_TREE, build_string (2, "1 ")),
DECL_ATTRIBUTES (decl));
if ((flags & ECF_TM_PURE) && flag_tm)
apply_tm_attr (decl, get_identifier ("transaction_pure"));
@@ -10576,10 +10576,10 @@ build_common_builtin_nodes (void)
if (!builtin_decl_explicit_p (BUILT_IN_MEMCPY))
local_define_builtin ("__builtin_memcpy", ftype, BUILT_IN_MEMCPY,
- "memcpy", ECF_NOTHROW | ECF_LEAF | ECF_RET1);
+ "memcpy", ECF_NOTHROW | ECF_LEAF);
if (!builtin_decl_explicit_p (BUILT_IN_MEMMOVE))
local_define_builtin ("__builtin_memmove", ftype, BUILT_IN_MEMMOVE,
- "memmove", ECF_NOTHROW | ECF_LEAF | ECF_RET1);
+ "memmove", ECF_NOTHROW | ECF_LEAF);
}
if (!builtin_decl_explicit_p (BUILT_IN_MEMCMP))
@@ -10597,7 +10597,7 @@ build_common_builtin_nodes (void)
ptr_type_node, integer_type_node,
size_type_node, NULL_TREE);
local_define_builtin ("__builtin_memset", ftype, BUILT_IN_MEMSET,
- "memset", ECF_NOTHROW | ECF_LEAF | ECF_RET1);
+ "memset", ECF_NOTHROW | ECF_LEAF);
}
/* If we're checking the stack, `alloca' can throw. */