[Bug c/31072] [4.2/4.3 Rgression] Wrong code for volatile var with initalization and optimization
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Mar 8 19:15:00 GMT 2007
------- 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
More information about the Gcc-bugs
mailing list