aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c')
-rw-r--r--gcc/c/ChangeLog5
-rw-r--r--gcc/c/c-decl.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index ada2e4b..4d2897e 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,6 +1,11 @@
2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
PR middle-end/91421
+ * c-decl.c (merge_decls): Use copy_decl_built_in_function.
+
+2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR middle-end/91421
* c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
of a built_in_function.
(diagnose_mismatched_decls, implicitly_declare): Update accordingly.
diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c
index 18a97db..31116b2 100644
--- a/gcc/c/c-decl.c
+++ b/gcc/c/c-decl.c
@@ -2736,8 +2736,7 @@ merge_decls (tree newdecl, tree olddecl, tree newtype, tree oldtype)
{
/* If redeclaring a builtin function, it stays built in.
But it gets tagged as having been declared. */
- DECL_BUILT_IN_CLASS (newdecl) = DECL_BUILT_IN_CLASS (olddecl);
- DECL_FUNCTION_CODE (newdecl) = DECL_FUNCTION_CODE (olddecl);
+ copy_decl_built_in_function (newdecl, olddecl);
C_DECL_DECLARED_BUILTIN (newdecl) = 1;
if (new_is_prototype)
{