This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/31072] [4.2/4.3 Rgression] Wrong code for volatile var with initalization and optimization



------- Comment #8 from pinskia at gcc dot gnu dot org  2007-03-08 19:15 -------
Here is the patch which I am testing:
Index: c-decl.c
===================================================================
--- c-decl.c    (revision 1532)
+++ c-decl.c    (working copy)
@@ -1650,11 +1650,7 @@ merge_decls (tree newdecl, tree olddecl,
     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))


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31072


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]