OSDN Git Service

2003-04-17 Roger Sayle <roger@eyesopen.com>
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 17 Apr 2003 21:27:37 +0000 (21:27 +0000)
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 17 Apr 2003 21:27:37 +0000 (21:27 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65753 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/c-decl.c
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/f/ChangeLog
gcc/f/com.c
gcc/testsuite/gcc.c-torture/execute/builtin-noret-2.x [deleted file]

index 660d0d6..7beb2fc 100644 (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
index 0614476..c852bd7 100644 (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);
        }
index 093198c..05545f1 100644 (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
index 33881d9..5abb3f4 100644 (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.  */
index 47240a4..2df580c 100644 (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.
index 6c60644..c92786b 100644 (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);
        }
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtin-noret-2.x b/gcc/testsuite/gcc.c-torture/execute/builtin-noret-2.x
deleted file mode 100644 (file)
index 7926a94..0000000
+++ /dev/null
@@ -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