diff options
author | Andrew Pinski <andrew_pinski@playstation.sony.com> | 2007-03-09 00:32:34 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2007-03-08 16:32:34 -0800 |
commit | ee9f69b425fabd8af248d75fe7ee62ca17112253 (patch) | |
tree | 00b828664fda1c04e56f45ffb7f17ee5c3ffab4e /gcc/c-decl.c | |
parent | 99681c8b0fdde287c11d0ef22cf6341fc661d323 (diff) | |
download | gcc-ee9f69b425fabd8af248d75fe7ee62ca17112253.zip gcc-ee9f69b425fabd8af248d75fe7ee62ca17112253.tar.gz gcc-ee9f69b425fabd8af248d75fe7ee62ca17112253.tar.bz2 |
re PR c/31072 ([4.2 Rgression] Wrong code for volatile var with initalization and optimization)
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 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR C/31072
* gcc.c-torture/execute/pr31072.c: New test.
From-SVN: r122736
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 0d9fce5..fd5b065 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -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)) |