OSDN Git Service

PR tree-opt/20127
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 25 Feb 2005 01:56:14 +0000 (01:56 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 25 Feb 2005 01:56:14 +0000 (01:56 +0000)
        * tree-sra.c (instantiate_element): Copy TREE_THIS_VOLATILE from
        the type.

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

gcc/ChangeLog
gcc/tree-sra.c

index 36d0804..26aea68 100644 (file)
@@ -1,3 +1,9 @@
+2005-02-24  Richard Henderson  <rth@redhat.com>
+
+       PR tree-opt/20127
+       * tree-sra.c (instantiate_element): Copy TREE_THIS_VOLATILE from
+       the type.
+
 2005-02-24  Fariborz Jahanian <fjahanian@apple.com>
 
        * config/rs6000/rs6000.c (rs6000_legitimize_reload_address): Check for
index 1510904..267655d 100644 (file)
@@ -1116,6 +1116,12 @@ instantiate_element (struct sra_elt *elt)
   DECL_SOURCE_LOCATION (var) = DECL_SOURCE_LOCATION (base);
   DECL_ARTIFICIAL (var) = 1;
 
+  if (TREE_THIS_VOLATILE (elt->type))
+    {
+      TREE_THIS_VOLATILE (var) = 1;
+      TREE_SIDE_EFFECTS (var) = 1;
+    }
+
   if (DECL_NAME (base) && !DECL_IGNORED_P (base))
     {
       char *pretty_name = build_element_name (elt);