From cbf5d0e70c98103d28c869305043d9889bb36c8f Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Wed, 21 Jan 2015 09:04:53 +0000 Subject: re PR middle-end/64313 (gcc.dg/torture/builtin-explog-1.c fails on bare-metal targets) 2015-01-21 Richard Biener PR middle-end/64313 * tree-core.h (builtin_info, builtin_info_type): Turn from an object with two arrays into an array of an object with decl and two flags, implicit_p and declared_p. * tree.h (builtin_decl_explicit, builtin_decl_implicit, set_builtin_decl, set_builtin_decl_implicit_p, builtin_decl_explicit_p, builtin_decl_implicit_p): Adjust. (set_builtin_decl_declared_p, builtin_decl_declared_p): New functions. * builtins.c (builtin_info): Adjust. * gimplify.c (gimplify_addr_expr): References to builtins that have been declared by the user makes them eligible for use by the compiler. Call set_builtin_decl_implicit_p on them. c/ * c-decl.c (merge_decls): Call set_builtin_decl_declared_p for builtins the user declared correctly. cp/ * decl.c (duplicate_decls): Call set_builtin_decl_declared_p for builtins the user declared correctly. From-SVN: r219928 --- gcc/c/c-decl.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/c/c-decl.c') diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index b9424b5..48c2bcb 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -2582,6 +2582,8 @@ merge_decls (tree newdecl, tree olddecl, tree newtype, tree oldtype) set_builtin_decl_implicit_p (fncode, true); break; default: + if (builtin_decl_explicit_p (fncode)) + set_builtin_decl_declared_p (fncode, true); break; } } -- cgit v1.1