tree-ssa-alias.c (create_name_tags): If PTR points to a volatile type, mark the tag...
authorDiego Novillo <dnovillo@redhat.com>
Tue, 28 Sep 2004 13:45:05 +0000 (13:45 +0000)
committerDiego Novillo <dnovillo@gcc.gnu.org>
Tue, 28 Sep 2004 13:45:05 +0000 (09:45 -0400)
* tree-ssa-alias.c (create_name_tags): If PTR points to a
volatile type, mark the tag volatile.
(get_tmt_for): If TAG_TYPE is a volatile type, mark the tag
volatile.

From-SVN: r88232

gcc/ChangeLog
gcc/tree-ssa-alias.c

index cfe0b00612abc757794f4681e26b3f2d47a5b448..5f482cce1046981d25fe2081bd7b333ef3885cb7 100644 (file)
@@ -1,3 +1,10 @@
+2004-09-28  Diego Novillo  <dnovillo@redhat.com>
+
+       * tree-ssa-alias.c (create_name_tags): If PTR points to a
+       volatile type, mark the tag volatile.
+       (get_tmt_for): If TAG_TYPE is a volatile type, mark the tag
+       volatile.
+
 2004-09-28  Andrew Pinski  <pinskia@physics.uc.edu>
 
        * tree.def (vec_cond_expr): Fix. Change 'e'
index 883c53d935e628e3cad24917032bcc74f59cbfd6..17f2dc98948c863639a664a0d558e15dfc780530 100644 (file)
@@ -809,6 +809,9 @@ create_name_tags (struct alias_info *ai)
          continue;
        }
 
+      TREE_THIS_VOLATILE (pi->name_mem_tag)
+         |= TREE_THIS_VOLATILE (TREE_TYPE (TREE_TYPE (ptr)));
+
       /* Mark the new name tag for renaming.  */
       bitmap_set_bit (vars_to_rename, var_ann (pi->name_mem_tag)->uid);
     }
@@ -2138,7 +2141,7 @@ get_tmt_for (tree ptr, struct alias_info *ai)
     }
 
   /* If the pointed-to type is volatile, so is the tag.  */
-  TREE_THIS_VOLATILE (tag) = TREE_THIS_VOLATILE (tag_type);
+  TREE_THIS_VOLATILE (tag) |= TREE_THIS_VOLATILE (tag_type);
 
   /* Make sure that the type tag has the same alias set as the
      pointed-to type.  */