re PR c/10375 (Function-local external decls of builtins don't get attributes)

2003-04-17  Roger Sayle  <roger@eyesopen.com>

	PR c/10375
	* c-decl.c (duplicate_decls): Preserve "const" and "noreturn"
	function attributes.

	* cp/decl.c (duplicate_decls): Preserve "const", "noreturn"
	and "nothrow" function attributes.

	* f/com.c (duplicate_decls): Preserve "const" and "noreturn"
	function attributes.

From-SVN: r65753
This commit is contained in:
Roger Sayle 2003-04-17 21:27:37 +00:00 committed by Roger Sayle
parent 1ca4c6e1e8
commit 220a35cc8e
7 changed files with 25 additions and 12 deletions

View File

@ -1,3 +1,9 @@
2003-04-17 Roger Sayle <roger@eyesopen.com>
PR c/10375
* c-decl.c (duplicate_decls): Preserve "const" and "noreturn"
function attributes.
2003-04-17 Janis Johnson <janis187@us.ibm.com>
* doc/sourcebuild.texi (Test Suites): Document support for testing

View File

@ -1377,6 +1377,8 @@ duplicate_decls (newdecl, olddecl, different_binding_level)
DECL_NO_LIMIT_STACK (newdecl) |= DECL_NO_LIMIT_STACK (olddecl);
DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (newdecl)
|= DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (olddecl);
TREE_THIS_VOLATILE (newdecl) |= TREE_THIS_VOLATILE (olddecl);
TREE_READONLY (newdecl) |= TREE_READONLY (olddecl);
DECL_IS_MALLOC (newdecl) |= DECL_IS_MALLOC (olddecl);
DECL_IS_PURE (newdecl) |= DECL_IS_PURE (olddecl);
}

View File

@ -1,3 +1,9 @@
2003-04-17 Roger Sayle <roger@eyesopen.com>
PR c/10375
* decl.c (duplicate_decls): Preserve "const", "noreturn" and
"nothrow" function attributes.
2003-04-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/10347

View File

@ -3360,6 +3360,9 @@ duplicate_decls (tree newdecl, tree olddecl)
DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (newdecl)
|= DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (olddecl);
DECL_NO_LIMIT_STACK (newdecl) |= DECL_NO_LIMIT_STACK (olddecl);
TREE_THIS_VOLATILE (newdecl) |= TREE_THIS_VOLATILE (olddecl);
TREE_READONLY (newdecl) |= TREE_READONLY (olddecl);
TREE_NOTHROW (newdecl) |= TREE_NOTHROW (olddecl);
DECL_IS_MALLOC (newdecl) |= DECL_IS_MALLOC (olddecl);
DECL_IS_PURE (newdecl) |= DECL_IS_PURE (olddecl);
/* Keep the old RTL. */

View File

@ -1,3 +1,9 @@
2003-04-17 Roger Sayle <roger@eyesopen.com>
PR c/10375
* com.c (duplicate_decls): Preserve "const" and "noreturn"
function attributes.
2003-04-13 Roger Sayle <roger@eyesopen.com>
* com.c (duplicate_decls): Preserve pure and malloc attributes.

View File

@ -13335,6 +13335,8 @@ duplicate_decls (tree newdecl, tree olddecl)
{
DECL_STATIC_CONSTRUCTOR(newdecl) |= DECL_STATIC_CONSTRUCTOR(olddecl);
DECL_STATIC_DESTRUCTOR (newdecl) |= DECL_STATIC_DESTRUCTOR (olddecl);
TREE_THIS_VOLATILE (newdecl) |= TREE_THIS_VOLATILE (olddecl);
TREE_READONLY (newdecl) |= TREE_READONLY (olddecl);
DECL_IS_MALLOC (newdecl) |= DECL_IS_MALLOC (olddecl);
DECL_IS_PURE (newdecl) |= DECL_IS_PURE (olddecl);
}

View File

@ -1,12 +0,0 @@
# This test fails at -O1 and higher.
set torture_eval_before_compile {
global compiler_conditional_xfail_data
set compiler_conditional_xfail_data {
"Fails at all optimization levels but -O0, see PR10375." \
{ "*-*-*" } \
{ "-O*" } \
{ "-O0" }
}
}
return 0