OSDN Git Service

2007-03-08 Andrew Pinski <andrew_pinski@playstation.sony.com>
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 9 Mar 2007 00:32:34 +0000 (00:32 +0000)
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 9 Mar 2007 00:32:34 +0000 (00:32 +0000)
        PR C/31072
        * c-decl.c (merge_decls): Don't call make_var_volatile.
        * varasm.c (make_var_volatile): Remove.
        * output.h (make_var_volatile): Remove.

2007-03-08  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR C/31072
        * gcc.c-torture/execute/pr31072.c: New test.

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

gcc/ChangeLog
gcc/c-decl.c
gcc/output.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/pr31072.c [new file with mode: 0644]
gcc/varasm.c

index 0cfed4b..91cb190 100644 (file)
@@ -1,3 +1,10 @@
+2007-03-08  Andrew Pinski  <andrew_pinski@playstation.sony.com>
+
+       PR C/31072
+       * c-decl.c (merge_decls): Don't call make_var_volatile.
+       * varasm.c (make_var_volatile): Remove.
+       * output.h (make_var_volatile): Remove.
+
 2007-03-08  Zdenek Dvorak  <dvorakz@suse.cz>
 
        PR tree-optimization/31085
index 0d9fce5..fd5b065 100644 (file)
@@ -1690,11 +1690,7 @@ merge_decls (tree newdecl, tree olddecl, tree newtype, tree oldtype)
     TREE_READONLY (olddecl) = 1;
 
   if (TREE_THIS_VOLATILE (newdecl))
-    {
-      TREE_THIS_VOLATILE (olddecl) = 1;
-      if (TREE_CODE (newdecl) == VAR_DECL)
-       make_var_volatile (newdecl);
-    }
+    TREE_THIS_VOLATILE (olddecl) = 1;
 
   /* Merge deprecatedness.  */
   if (TREE_DEPRECATED (newdecl))
index 3c9bcc4..a5c29f0 100644 (file)
@@ -170,10 +170,6 @@ extern void emutls_finish (void);
    Prefixes such as % are optional.  */
 extern int decode_reg_name (const char *);
 
-/* Make the rtl for variable VAR be volatile.
-   Use this only for static variables.  */
-extern void make_var_volatile (tree);
-
 extern void assemble_alias (tree, tree);
 
 extern void default_assemble_visibility (tree, int);
index 3023659..ba0392e 100644 (file)
@@ -1,3 +1,8 @@
+2007-03-08  Andrew Pinski  <andrew_pinski@playstation.sony.com>
+
+       PR C/31072
+       * gcc.c-torture/execute/pr31072.c: New test.
+
 2007-03-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * gcc.dg/builtins-55.c: Test *lceil* and *lfloor*.
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr31072.c b/gcc/testsuite/gcc.c-torture/execute/pr31072.c
new file mode 100644 (file)
index 0000000..beb4b55
--- /dev/null
@@ -0,0 +1,10 @@
+extern volatile int ReadyFlag_NotProperlyInitialized;
+
+volatile int ReadyFlag_NotProperlyInitialized=1;
+
+int main(void)
+{
+  if (ReadyFlag_NotProperlyInitialized != 1)
+    __builtin_abort ();
+  return 0;
+}
index c92a5a0..7e482b3 100644 (file)
@@ -1403,17 +1403,6 @@ make_decl_rtl (tree decl)
   if (flag_mudflap && TREE_CODE (decl) == VAR_DECL)
     mudflap_enqueue_decl (decl);
 }
-
-/* Make the rtl for variable VAR be volatile.
-   Use this only for static variables.  */
-
-void
-make_var_volatile (tree var)
-{
-  gcc_assert (MEM_P (DECL_RTL (var)));
-
-  MEM_VOLATILE_P (DECL_RTL (var)) = 1;
-}
 \f
 /* Output a string of literal assembler code
    for an `asm' keyword used between functions.  */